ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Various ConTeXt Questions
@ 2008-04-02 14:46 Edd Barrett
  2008-04-03  8:11 ` Wolfgang Schuster
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Edd Barrett @ 2008-04-02 14:46 UTC (permalink / raw)
  To: ntg-context

Hi there,

I am taking a look at conTeXt as a means of typesetting documents with
more advanced page layouts which otherwise would be produced with
desktop publishing suites.

I am very new to conTeXt, so I know very little about it. The only
documentation I have been able to find on the internet is:
ConTeXt Garden
ConTeXt an excursion
ConTeXt : The manual

I have been sifting through these for a while, and whilst the
documentation is good, I still have questions. I must apologise if I
missed the answers in the docs or if the questions are just plain
dumb.

1) Is there a way to make ConTeXt stricter?
It seem that ConTeXt will not complain if you misspell the names of
colours, layers, overlays etc. I would rather it did.

2) Is there a way to overlay many layers/overlays at one place.
It seems using background= can only take 1 layer/overlay. Even better
if I could offset the layer/overlay from an origin.

3) I have had difficulty pushing the whole layout including the margin
to the right about 2cm.
I have tried using setuplayout to alter leftedge, leftedgedistance and
backspace. Is that not the way to do it?

3a) Similarly I would like to make the textheight longer so that the
footer is about 1cm from the bottom of the page. I have had no luck in
setting textheight using setuplayout.

4) Is there a module to parse CVS tags, like the RCS package for laTeX?

5) Can I use OpenType and TrueType fonts in ConTeXt? Ideally via fontspec.

6) Is there a book on ConTeXt for beginners aside from what I have
already listed above?

7) Can I specify RGB colours in th 0 <= x <= 255 format?
So far I have had to write a script to help me convert them.

8) Is anyone proficient with ConTeXt going to the Cork TeX User Group meeting?

Thanks.

-- 

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-02 14:46 Various ConTeXt Questions Edd Barrett
@ 2008-04-03  8:11 ` Wolfgang Schuster
  2008-04-03  8:46   ` Edd Barrett
  2008-04-03  8:31 ` Hans Hagen
  2008-04-03 10:49 ` Mojca Miklavec
  2 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2008-04-03  8:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Edd,

> I am taking a look at conTeXt as a means of typesetting documents with
> more advanced page layouts which otherwise would be produced with
> desktop publishing suites.
>
> I am very new to conTeXt, so I know very little about it. The only
> documentation I have been able to find on the internet is:
> ConTeXt Garden
> ConTeXt an excursion
> ConTeXt : The manual

You can find all manuals from Pragma on their homepage:
http://www.pragma-ade.com/show-man-1.htm

> I have been sifting through these for a while, and whilst the
> documentation is good, I still have questions. I must apologise if I
> missed the answers in the docs or if the questions are just plain
> dumb.
>
> 1) Is there a way to make ConTeXt stricter?
> It seem that ConTeXt will not complain if you misspell the names of
> colours, layers, overlays etc. I would rather it did.
>
> 2) Is there a way to overlay many layers/overlays at one place.
> It seems using background= can only take 1 layer/overlay. Even better
> if I could offset the layer/overlay from an origin.

1. You could set multiple overlays with a comma seperated list and braces before
and after the list.

[...,background={overlay 1,overlay 2,...,overlay n},...]


2. You could use the x and y or offset, hoffset and voffset parameters
for \setlayer
to set the distance from your layer from all four corners of the page,
textblock or any
other pageblock.

> 3) I have had difficulty pushing the whole layout including the margin
> to the right about 2cm.
> I have tried using setuplayout to alter leftedge, leftedgedistance and
> backspace. Is that not the way to do it?

The distance between the left margin of the paper and the left margin of
the textblock is set with the backspace key for \setuplayout.

\setuplayout[backspace=...]

> 3a) Similarly I would like to make the textheight longer so that the
> footer is about 1cm from the bottom of the page. I have had no luck in
> setting textheight using setuplayout.

You could set a fixed value for the footer and let TeX calculate the textheight.

\setuplayout
  [bottomspace=1cm,
   height=fit]

> 4) Is there a module to parse CVS tags, like the RCS package for laTeX?
>
> 5) Can I use OpenType and TrueType fonts in ConTeXt? Ideally via fontspec.

It is possible to use TrueType and OpenType fonts with pdfTeX but this requires
tfm files and a map file.

The easier method is to use XeTeX or LuaTeX as engines and the only thing
you need is a typescript file with the font names and their mapping to ConTeXt's
own font names.

http://wiki.contextgarden.net/Fonts_in_XeTeX (a little bit outdated)
http://wiki.contextgarden.net/Mark_IV#Fonts_and_typescripts (shoudl
also work with XeTeX)

> 6) Is there a book on ConTeXt for beginners aside from what I have
> already listed above?

> 7) Can I specify RGB colours in th 0 <= x <= 255 format?
> So far I have had to write a script to help me convert them.

This is not possible but you could use the hex notation

\setupcolor[hex]
\setupcolors[state=start]

\definecolor[hexred]  [#FF0000]
\definecolor[hexgreen][h=00FF00]

\starttext

\color[hexred]{Red Text}

\color[hexgreen]{Green Text}

\stoptext

> 8) Is anyone proficient with ConTeXt going to the Cork TeX User Group meeting?
>
> Thanks.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-02 14:46 Various ConTeXt Questions Edd Barrett
  2008-04-03  8:11 ` Wolfgang Schuster
@ 2008-04-03  8:31 ` Hans Hagen
  2008-04-03 10:49 ` Mojca Miklavec
  2 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2008-04-03  8:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Edd Barrett wrote:

> 8) Is anyone proficient with ConTeXt going to the Cork TeX User Group meeting?

taco an i will be there

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-03  8:11 ` Wolfgang Schuster
@ 2008-04-03  8:46   ` Edd Barrett
  0 siblings, 0 replies; 8+ messages in thread
From: Edd Barrett @ 2008-04-03  8:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

Thanks for the input, that should be enough to keep me going.

I am going to push some of this info back to conTeXt garden if that is okay.

Will see you in Ireland Hans (if all goes to plan).

-- 

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-02 14:46 Various ConTeXt Questions Edd Barrett
  2008-04-03  8:11 ` Wolfgang Schuster
  2008-04-03  8:31 ` Hans Hagen
@ 2008-04-03 10:49 ` Mojca Miklavec
  2008-04-03 11:59   ` Aditya Mahajan
  2 siblings, 1 reply; 8+ messages in thread
From: Mojca Miklavec @ 2008-04-03 10:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Apr 2, 2008 at 4:46 PM, Edd Barrett wrote:

Hello,

>  1) Is there a way to make ConTeXt stricter?
>  It seem that ConTeXt will not complain if you misspell the names of
>  colours, layers, overlays etc. I would rather it did.

Currently not :(

>  3a) Similarly I would like to make the textheight longer so that the
>  footer is about 1cm from the bottom of the page. I have had no luck in
>  setting textheight using setuplayout.

Use height=... for that.

>  4) Is there a module to parse CVS tags, like the RCS package for laTeX?

There have been some attempts, but I don't remember the outcome.

>  5) Can I use OpenType and TrueType fonts in ConTeXt? Ideally via fontspec.

Fontspec is written for (Xe)LaTeX only (admittedly, it has some more
advanced features in comparison to ConTeXt mechanisms), but both XeTeX
and LuaTeX should nevertheless work OK with ConTeXt with no special
package or module.

Blame me for not updating the "Fonts in XeTeX" page on Wiki.

>  8) Is anyone proficient with ConTeXt going to the Cork TeX User Group meeting?

There is also a ConTeXt meeting in August (Easyjet flies from Stansted
almost directly to the conference site), so if you want some more fun
next to the lake in the middle of Alps, in a small country that you
have probably never visited before, you're more than welcome to come.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-03 10:49 ` Mojca Miklavec
@ 2008-04-03 11:59   ` Aditya Mahajan
  2008-04-03 16:44     ` Edd Barrett
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2008-04-03 11:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 3 Apr 2008, Mojca Miklavec wrote:

>>  4) Is there a module to parse CVS tags, like the RCS package for laTeX?
>
> There have been some attempts, but I don't remember the outcome.

Parsing tags is simple, for example, 
http://archive.contextgarden.net/message/20070920.231549.347dc370.en.html
and
http://archive.contextgarden.net/message/20080123.123404.d1e0dbab.en.html

If you can specify exactly what you want, I can create a module for this.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-03 11:59   ` Aditya Mahajan
@ 2008-04-03 16:44     ` Edd Barrett
  2008-04-03 19:44       ` Peter Münster
  0 siblings, 1 reply; 8+ messages in thread
From: Edd Barrett @ 2008-04-03 16:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users, adityam

On Thu, Apr 3, 2008 at 12:59 PM, Aditya Mahajan <adityam@umich.edu> wrote:
>  Parsing tags is simple, for example,
>  http://archive.contextgarden.net/message/20070920.231549.347dc370.en.html
>  and
>  http://archive.contextgarden.net/message/20080123.123404.d1e0dbab.en.html
>
>  If you can specify exactly what you want, I can create a module for this.

Just a way of isolating each of the marco's values that cvs defines. How about:

---8<---
\definecvskeyword[cvsdate][D/M/Y]{$Date$}% will be expanded upon
commit to something like $Date: 1999/12/23 01:59:22 $
\starttext
Last Updated: \cvskeyword[cvsdate]
\stoptext
---8<---

would produce:
Last Updated: 1999/12/23 01:59:22

List of standard keywords here, but bear in mind that users can ake
their own per repository:
http://badgertronics.com/writings/cvs/keywords.html


Thoughts?

-- 

Best Regards

Edd

http://students.dec.bournemouth.ac.uk/ebarrett
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Various ConTeXt Questions
  2008-04-03 16:44     ` Edd Barrett
@ 2008-04-03 19:44       ` Peter Münster
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Münster @ 2008-04-03 19:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Apr 03 2008, Edd Barrett wrote:

> Just a way of isolating each of the marco's values that cvs defines. How about:
> 
> ---8<---
> \definecvskeyword[cvsdate][D/M/Y]{$Date$}% will be expanded upon
> commit to something like $Date: 1999/12/23 01:59:22 $
> \starttext
> Last Updated: \cvskeyword[cvsdate]
> \stoptext
> ---8<---
> 
> would produce:
> Last Updated: 1999/12/23 01:59:22

Hello Edd,

Perhaps like this:

% engine=luatex

\startluacode
thirddata = thirddata or { }

-- write the replacement string
-- p: pattern
-- r: replacement pattern
-- s: subject
function thirddata.replace(p, r, s)
	s = string.gsub(s, "^.-" .. p .. ".-$", r)
	tex.print(s)
end
\stopluacode

\def\definereplacement{\doquadrupleargument\dodefinereplacement}

\def\dodefinereplacement[#1][#2][#3][#4]{\expandafter
  \def\csname #1\endcsname{\ctxlua{thirddata.replace("#2", "#3", "#4")}}}

\definereplacement[cvsdate] [(\%d+)/(\%d+)/(\%d+)] [\%3.\%2.\%1]
                  [$Date: 1999/12/23 01:59:22 $]
\definereplacement[cvstime] [(\%d+):(\%d+):(\%d+)] [\%1h \%2m \%3s]
                  [$Date: 1999/12/23 01:59:22 $]
\definereplacement[cvsfile] [: (.+),] [\\type{\%1}]
                  [$RCSfile: keyword.html,v $]

\starttext
File: \cvsfile, last Updated: \cvsdate\ at \cvstime
\stoptext


Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-04-03 19:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-02 14:46 Various ConTeXt Questions Edd Barrett
2008-04-03  8:11 ` Wolfgang Schuster
2008-04-03  8:46   ` Edd Barrett
2008-04-03  8:31 ` Hans Hagen
2008-04-03 10:49 ` Mojca Miklavec
2008-04-03 11:59   ` Aditya Mahajan
2008-04-03 16:44     ` Edd Barrett
2008-04-03 19:44       ` Peter Münster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).