[NTG-context] Vertically Aligning inmargin Text to Figure

2013-04-29 Thread Malte Stien
Hi,

I need to associate a bit of text with a figure in a book. The text is 
not---and cannot be---the figure caption (it's providing some explanation with 
respect to some labels in the figure). I have tried the following based on some 
other post on the mailing list:

\definepapersize[eightsquare][width=8in, height=8in]
\setuppapersize[eightsquare]

\setuplayout[
location=doublesided, marking=on, backspace=43mm, leftmargin=18mm,
leftmargindistance=4mm, rightmargin=35mm, rightmargindistance=4mm, 
rightedgewidth=6mm,
topspace=12mm, header=15mm, footer=15mm, height=179mm, width=115mm
]

\starttext

\startplacefigure[location=force, title={First dummy caption}]
\inmargin{First margin dummy}
\externalfigure[dummy][width=115mm]
\stopplacefigure

\stoptext

However, that results in the text being down the bottom of the figure. I need 
the text to be vertically aligned with the top of the figure. I have attached 
the resulting PDF for illustration purposes (is that okay on this mailing list? 
It's very small).

Any hints would be much appreciated.

Thank you,
Malte.



test.pdf
Description: Adobe PDF document

--
“The Electric Monk was a labour-saving device, like a dishwasher or a video 
recorder... Electric Monks believed things for you, thus saving you what was 
becoming an increasingly onerous task, that of believing all the things the 
world expected you to believe.”

― Douglas Adams, Dirk Gently's Holistic Detective Agency

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] SIMPLEFONTS MODULE

2013-04-29 Thread MANUEL GONZALEZ SUAREZ
Hello everyone.I have a doubt about the simplefonts module. I need to compose a text in Spanish and Greek. I would use a font for the text in Spanish (LinuxLibertine O) and another for the Greek text (Bosporos). How should you configure the simplefontsmodule?Thank you.-- Manuel González Suárez
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Vertically Aligning inmargin Text to Figure

2013-04-29 Thread Wolfgang Schuster

Am 29.04.2013 um 09:33 schrieb Malte Stien ma...@stien.de:

 Hi,
 
 I need to associate a bit of text with a figure in a book. The text is 
 not---and cannot be---the figure caption (it's providing some explanation 
 with respect to some labels in the figure). I have tried the following based 
 on some other post on the mailing list:
 
 \definepapersize[eightsquare][width=8in, height=8in]
 \setuppapersize[eightsquare]
 
 \setuplayout[
   location=doublesided, marking=on, backspace=43mm, leftmargin=18mm,
   leftmargindistance=4mm, rightmargin=35mm, rightmargindistance=4mm, 
 rightedgewidth=6mm,
   topspace=12mm, header=15mm, footer=15mm, height=179mm, width=115mm
 ]
 
 \starttext
 
 \startplacefigure[location=force, title={First dummy caption}]
 \inmargin{First margin dummy}
 \externalfigure[dummy][width=115mm]
 \stopplacefigure
 
 \stoptext
 
 However, that results in the text being down the bottom of the figure. I need 
 the text to be vertically aligned with the top of the figure. I have attached 
 the resulting PDF for illustration purposes (is that okay on this mailing 
 list? It's very small).
 
 Any hints would be much appreciated.


You can set the text in the margin with the second argument of 
\startplacefigure.

\define\FigureText
  {\dowithnextbox
 {\startlinealignment[middle]
  
\copy\nextbox\rlap{\hskip\rightmargindistance\framed[frame=off,width=\rightmarginwidth,height=\nextboxht]{\floatuserdataparameter{text}}}
  \stoplinealignment}
 \hbox}

\setupfloat[figure][command=\FigureText]

\starttext

\startplacefigure[title=Dummy figure][text=Margin dummy]
\externalfigure[dummy][width=.8\textwidth]
\stopplacefigure

\stoptext

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table formatting mystery

2013-04-29 Thread Lance Larsen
Thankyou luigi. The suggestion provided below worked. I wish I understood
why context thought that a cell height to two rows were needed, but the
combination of \hbox and alignment of lohi is a reasonable workaround.
 
-Lance
 
On Thu, Apr 25, 2013 at 5:02 PM, Lance Larsen lance.c.larsen at gmail.com
http://www.ntg.nl/mailman/listinfo/ntg-context  wrote:
 I created the following table, but I am running into a mysterious
 problem. When I include the text 'Geometry Calulations' in row 2, the
 table row expands as if this text takes up lines of text. However the
 text fits well within the cell length, and the text itself remains on
 one line. If I delete 'Geometry Calculations', the height of row 2 is
 the height of one line of text. How do I fix this? I have included
 snapshots of what I am getting with and without 'Geometry
 Calculations' included. Any help or insight is appreciated.
 
 \setupTABLE[c][1][width=0.16\textwidth]
 \setupTABLE[c][2,3,4][width=0.13\textwidth]
 \setupTABLE[c][5][width=0.20\textwidth, align=middle]
 \setupTABLE[c][6][width=0.25\textwidth, align=middle]
 \bTABLE[width=0.5\textwidth, rulethickness=0.5pt]
 \bTR \bTD[nc=2]   \bf ~\cb Preliminary \cb Final\eTD
 \bTD[align=middle] \bf Revision \eTD \bTD[align=middle] X \eTD \bTD
 \bf Document ID \eTD \bTD \DocID \eTD \eTR
 \bTR \bTD[nc=2]   \bf ~Document Title:  \eTD \bTD[nc=4,align=middle]
  Geometry Calculations  \eTD \eTR
 \bTR \bTD[nc=2]   \bf ~Originating Discipline:  \eTD
 \bTD[nc=4,align=middle]   \OrigDisc
   \eTD \eTR
 \bTR \bTD[nc=2]   \bf ~Effective Date:  \eTD \bTD[nc=3]  \tfx  ~\cb
 Approval Date \sp\sp\cb Other:    \eTD \bTD
 Page~\pagenumber~of~\totalnumberofpages  \eTD \eTR
 \bTR \bTD \bf ~Issued for: \eTD \bTD[nc=5,align=middle]
 \tfx Phase 1 Design \cb\sp Phase 2 Design \cb\sp Phase 3 Design \cb\sp
 Input to DCD \cb\sp N/A \cb \eTD \eTR
 \eTABLE
 
 -Lance Larsen
 
\bTR \bTD[nc=2,style=bold,align={flushleft,lohi}] \hbox{~Document
Title} \eTD \bTD[nc=4,align=middle]  Geometry Calculations  \eTD \eTR
 
seems to fix the things.
 
 
--
luigi

 

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] SIMPLEFONTS MODULE

2013-04-29 Thread Pablo Rodríguez


On 29/04/13 11:40, MANUEL GONZALEZ SUAREZ wrote:
 Hello everyone.
 I have a doubt about the simplefonts module. I need to compose a text in
 Spanish and Greek. I would use a font for the text in Spanish
 (LinuxLibertine O) and another for the Greek text(Bosporos). How should
 you configure the simplefontsmodule?
 Thank you.

Hi Manuel,

\mainlanguage[es]
\setuplanguage[es][patterns={es,agr}]
\usemodule[simplefonts]
\setmainfontfallback[Bosporos][range={greekandcoptic, greekextended},
force=yes]
\setmainfont{LinuxLibertine O]
\starttext
\showhyphens{ἐλευθερία estimación}
\stoptext

If you load hyphenation patterns for ancient Greek and Spanish, you will
get correct hyphenation for both languages. (Hyphenation is right,
because this languages don't share any character.)

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] How do you customize the chapter number format?

2013-04-29 Thread Lance Larsen
I am trying to update the chapter number formatting for the chapter heading.
By default the numbering is like

1 First Chapter
1.1 First Section

I would like to change this to:

1.0 First Chapter
1.1 First Section

Adding the following command worked, except it did not change the numbering
in the table of contents:

\setuphead[chapter][numbercommand=\groupedcommand{}{.0\blank[2cm]}]

Any suggestions for how I change the numbering so that the 1.0 shows up in
the table of contents as well?

-Lance Larsen

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] error: terminal: NOfTextColumns-1, ! Improper final value has been replaced by 0

2013-04-29 Thread Lars Huttar
On 4/26/2013, Hans Hagen wrote:
 
 On 4/24/2013 5:30 PM, Lars Huttar wrote:
 / ...
 /
 It took me a while to figure it out as NOfTextColumns is only used in 
 very special cases and long gone from context (it dates from a previous 
 background implementation). Normally the obsolete code is never seen but 
 in your case consulting the variable might be triggered by the fact that

 multi_column_first_page_hack

 is set to true (looks like a quick hack i made for Jelle long ago).

 I commented it in the mkii source now, hopefully no error message any 
 longer.

Thank you. How can I make this change in our ConTeXt installations?
As noted previously, the only place I could find a mention of/
 for i=1 upto NOfTextColumns-1/
was in some code that was already commented out. So I don't know how I
would comment it out any more effectively than that.


 Hans

 ps. sometimes there is some specific test code that then depends on 
 other experimental code being present

 ps. in mkiv it's all redone anyway and i will redo columnsets one of 
 these days too;

Jut to make sure it's clear, I'm running ConTeXt with mkiv.
(ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2013.3.11)

I mention that because I'm not sure if your statement about mkiv implies
that this error shouldn't be happening if I'm already using mkiv.

Lars

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] error: terminal: NOfTextColumns-1, ! Improper final value has been replaced by 0

2013-04-29 Thread Hans Hagen

On 4/29/2013 9:10 PM, Lars Huttar wrote:


I mention that because I'm not sure if your statement about mkiv implies
that this error shouldn't be happening if I'm already using mkiv.


maybe there's something in a style?

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How do you customize the chapter number format?

2013-04-29 Thread Wolfgang Schuster

Am 29.04.2013 um 20:42 schrieb Lance Larsen lance.c.lar...@gmail.com:

 I am trying to update the chapter number formatting for the chapter heading.
 By default the numbering is like
 
 1 First Chapter
 1.1 First Section
 
 I would like to change this to:
 
 1.0 First Chapter
 1.1 First Section
 
 Adding the following command worked, except it did not change the numbering
 in the table of contents:
 
 \setuphead[chapter][numbercommand=\groupedcommand{}{.0\blank[2cm]}]
 
 Any suggestions for how I change the numbering so that the 1.0 shows up in
 the table of contents as well?

\define[1]\ChapterConversion
  {\convertnumber{Numbers}{#1}.0}

\defineconversion[ChapterConversion][\ChapterConversion]

\setuphead[chapter][conversion=ChapterConversion]

\starttext

\completecontent

\chapter{First Chapter}

\section{First Section}

\stoptext

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Draw a line below the header texts

2013-04-29 Thread Wolfgang Schuster

Am 27.04.2013 um 11:00 schrieb Tim Li timli2...@outlook.com:

 Hi,
  
 now I need a line below the header text to seperate the header texts from the 
 text area. I have't soloved this problem, have to ask for help
  
 (the method from google doesn't work any more. This new one is from Aditya, 
 but still has some problem that I don't know how to deal with)
  
 \setupbackgrounds
   [header][text]
   [bottomframe=on]

\setupheader[text][after=\hrule]

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] latest beta and ancient greek module

2013-04-29 Thread Alan Bowen
The latest beta (ConTeXt  ver: 2013.04.30 00:31 MKIV beta) seems to have a
problem with the ancient greek module:

resolversmodules  'ancientgreek' is loaded

(/Users/alancbowen/texmf/tex/context/third/greek/t-ancientgreek.mkiv

loading  module ancientgreek

(/Users/alancbowen/texmf/tex/context/third/greek/type-agr.tex

! Undefined control sequence.


system   tex  error on line 5 in file
/Users/alancbowen/texmf/tex/context/third/greek/type-agr.tex: Undefined
control sequence ...


 1 %

 2 % Typescript for Greek fonts

 3 %

 4

 5   \beginOLDTEX

 6 \loadmapfile[tasgreek.map]

 7

 8 \starttypescript [serif] [Alkaios] [name]

 9   \usetypescript[serif][fallback]

10   \definefontsynonym [Serif]   [Alkaios]  [encoding=agr]

11   \definefontsynonym [SerifItalic] [Alkaiosit]  [encoding=agr]

12   \definefontsynonym [SerifBold]   [Alkaiosbo]  [encoding=agr]

13   \definefontsynonym [SerifBoldItalic] [Alkaiosboit]  [encoding=agr]

14 \stoptypescript

15


l.5 \beginOLDTEX


Alan
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___