Re: [NTG-context] File name to print to include %

2015-03-18 Thread luigi scarso
On Wed, Mar 18, 2015 at 8:53 AM, Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz wrote:

 Hello,

 I'd like to get:

 %Home%

 with \hyphenatedfilename to the Ctx output.

 But, these two methods don't work:

 \hyphenatedfilename{\%Home\%} -- gives \%Home\% and
 \hyphenatedfilename{%Home%} -- (obviously) produces error.

 So what to write into \hyphenatedfilename to get %Home%?


\hyphenatedfilename\expandafter{\letterpercent Home\letterpercent}

-- 
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] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-18 Thread Gerben Wierda
On 18 Mar 2015, at 08:46, Hans Hagen pra...@wxs.nl wrote:

 On 3/18/2015 7:34 AM, Gerben Wierda wrote:
 On 18 Mar 2015, at 02:14, Hans Hagen pra...@wxs.nl
 mailto:pra...@wxs.nl wrote:
 
 On 3/17/2015 10:33 PM, Gerben Wierda wrote:
 On 17 Mar 2015, at 16:51, Hans Hagen pra...@wxs.nl
 mailto:pra...@wxs.nl wrote:
 
 On 3/17/2015 3:41 PM, Gerben Wierda wrote:
 Nobody?
 
 On 15 Mar 2015, at 22:12, Gerben Wierda gerben.wie...@rna.nl
 mailto:gerben.wie...@rna.nl wrote:
 
 Now that I have my book project basically running on mkiv (the
 layout probably has a few problems left, the main one currently
 being extra whitespace after a chapter heading  compared to mkii),
 I’d like to try producing ePUB from it.
 
 ConTeXtgarden says I have to add a backend and points me to the
 info on the standard project structure (which I use), but there I
 don’t find anything about a backend. The extended example says
 that starting january 2015, things have changed with ePUB, which
 probably also applies to me as I only recently started with a
 fresh download of a current ConTeXt mkiv.
 
 So, can someone tell me what I need to do to get a basic ePUB output?
 
 \setupbackend
 [export=yes]
 
 more on wiki
 
 The wiki doesn’t really help. Am I supposed to create another product
 file in …/products?
 
 no, just enable it ... export files end up in a subpath
 
 I did add this to the environment file and tried to create an ePub for
 the whole book and for an individual chapter, but no success yet:
 
 luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
 mtxrun --script epub --make c_loosely.specification)
 Setting /usr/local/src/ConTeXt/tex as ConTeXt root.
 
 mtx-epub| unknown specificaton file
 'c_loosely.specification-export/c_loosely.specification-pub' for
 'c_loosely.specification'
 luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
 mtxrun --script epub --make prd_book.specification)
 Setting /usr/local/src/ConTeXt/tex as ConTeXt root.
 
 mtx-epub| unknown specificaton file
 'prd_book.specification-export/prd_book.specification-pub' for
 'prd_book.specification'
 
 
 What am I missing? What is a specification file?
 
 you process the tex file as normal .. that will produce a specification file 
 that will be used if you use mtxrun --script epub later (the call is 
 mentioned at the end of a tex run that has the export enabled)

Ha, I’ve got my first ePUB!

(. /usr/local/src/ConTeXt/tex/setuptex  context --mode=editor  
../products/prd_book.tex)
(. /usr/local/src/ConTeXt/tex/setuptex  mtxrun --script epub --make 
prd_book)

Now, it’s time to see how I can tweak the ePUB.

Things I would like to do:
- The quotes that now appear on the LHS page facing the first page of a chapter 
should instead appear on the top of the RHS new chapter page above the heading
- manage footnotes. Probably best is to have them at the end of the chapter 
when producing for ePub. Basically, I need to know what to do if the structure 
of my document differs between PDF and ePUB.
- manage the index (empty now)
- manage bibliographic references (empty now)
 And of course I need to look into CSS and stuff to create a nice ePUB

G

 
 Hans
 
 
 -
  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
 ___

___
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] File name to print to include %

2015-03-18 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'd like to get:

%Home%

with \hyphenatedfilename to the Ctx output.

But, these two methods don't work:

\hyphenatedfilename{\%Home\%} -- gives \%Home\% and
\hyphenatedfilename{%Home%} -- (obviously) produces error.

So what to write into \hyphenatedfilename to get %Home%?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

___
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] ePUB creation problems

2015-03-18 Thread Gerben Wierda
I’m getting to the next phase of ePUB creation. My project now exports and with 
mtxrun —script epub, I can create an actual ePUB, but there are issues I need 
to fix.

One is the lack of a cover image. The command for epub creation works, but says:

(. /usr/local/src/ConTeXt/tex/setuptex  mtxrun --script epub --make 
prd_book)

mtx-epub| using specification file 'prd_book-export/prd_book-pub.lua'
mtx-epub| the 'mudraw' binary is not present
mtx-epub| cover page image 'cover.xhtml' is not present
mtx-epub| saving dummy coverpage to 'prd_book-export/cover.xhtml'

I’m using in the env file:
\setupbackend
 [export=yes]
\setupexport
   [title={Chess and the Art of Enterprise Architecture},
author={Gerben Wierda},
firstpage={9789081984058-CoverFront.jpeg},
   ]

So, what seems to be ignored is

\setupexport
   [title={Chess and the Art of Enterprise Architecture},
author={Gerben Wierda},
firstpage={9789081984058-CoverFront.jpeg},
   ]

What am I missing?

G___
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] [MetaFun] Decorating running text

2015-03-18 Thread Norbert Melzer
Hi there!

I have some text (a single word) which I want to decorate using MP.

In this special case, I want to put a little crown above the g in the
word Shogun. Also the crown and text should get scaled accordingly to the
surrounding text.

```tex
\define\Shogun{\startMPcode draw textext(Shogun) \stopMPcode}

\starttext
  The word \Shogun\ shall be decorated with the crown shown in
fig~\in[fig:crown]:

  \placefigure[here][fig:crown]{The crown that shall decorate the \quote{g}
in \quotation{Shogun}}{
  \startMPcode
fill
(-20,-17.5)--(20,-17.5)--(30,12.5)--(10,-2.5)--(0,17.5)--(-10,-2.5)--(-30,12.5)--cycle
  withcolor yellow ;
  \stopMPcode }
\stoptext
```

I wanted to try to draw the text using MPs draw, but then the baselines
doesn't match as you can see in the example. Also I don't know how I could
ensure that the text and the crown would crow accordingly to the
surrounding text.
___
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] Export: \setuphemistich distance=

2015-03-18 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

In the attached, we export hemistiches:

===
\setupexport[cssfile=sh_ahmad-qajar.css]
\setupbackend[export=yes]

\usemodule[hemistich]

\setuphemistich
  [width=local,
   distance=1\emwidth,
   separator=]

   \setuphemistich
  [leftcolor=,
   separatorcolor=,
   rightcolor=]

   \setuphemistich
  % [separator=\vl\hskip.25em\vl]
  [separator=]

%% We need separate lines in the export, so use \start|stoplines
\definestartstop[VERSES][before={\blank[medium]\startlines  
\noindentation},after={\stoplines \blank[medium]}]

\starttext
\startVERSES
\hemistiches{Become a shunner of your affairs;}{Entrust all affairs to the  
Decision.}
\hemistiches{Thus tight spaces will often widen;}{And open spaces will  
often get tight.}

\stopVERSES
\stoptext
===

In the output we get

===
div
 div class=lines
  div class=linediv class=lineBecome a shunner of your  
affairs;Entrust all affairs to the Decision./divdiv class=lineThus  
tight spaces will often widen;And open spaces will often get  
tight./div/div

 /div
/div
===

Is there anyway to tag and export the distance info:

distance=1\emwidth

so that we can get some space in the xhtml. Note that I do not expect any  
of the alignment that the hemistiches module provides. Just some  
reasonable space.


That said: How do I design a \start|stophemistiches environment that would  
get tagged in the output as such (i.e., div class=hemistiches)?


Thanks in advance and best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] PLacing framed text.

2015-03-18 Thread John Culleton
I know how to place an intermezzo, e.g.
\starttext
\setupframed[framecorner=round,
frameradius=1em,
background=screen,
backgroundscreen=0.70,
backgroundcorner=round,
backgroundradius=1em,
corner=round,
radius=1em]
\definefloat[intermezzo]{  }

\placeintermezzo[right]{}
\startframedtext[width=3.2in]

\centerline{\ss\tfb Life Before Specialty}
\centerline{\ss\tfb Food Marketing}
\tfx
What food entrepeneurs did before starting a specialty food firm (in order of
prevalence):
---{\bf\it Food Entrepeneur Magazine}

\stopframedtext
\stoptext

But I don't want the word intermezzo at the
bottom of the frame. In other words I want to
place the framed text but not call it an
intermezzo.

Any suggestions?
-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: Create Book Covers with
Scribus 1.4.5 coming soon at
http://www.booklocker.com/!
___
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] ePUB creation problems

2015-03-18 Thread Hans Hagen

On 3/18/2015 1:00 PM, Gerben Wierda wrote:

I’m getting to the next phase of ePUB creation. My project now exports
and with mtxrun —script epub, I can create an actual ePUB, but there are
issues I need to fix.


attached a manual i'm on-and-off working on .. i have no time now for 
more info


Hans

-
  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
-


epub-mkiv.pdf
Description: Adobe PDF document
___
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] Export: \setuphemistich distance=

2015-03-18 Thread Wolfgang Schuster

 Am 18.03.2015 um 15:04 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Dear gang,
 
 In the attached, we export hemistiches:
 
 ===
 \setupexport[cssfile=sh_ahmad-qajar.css]
 \setupbackend[export=yes]
 
 \usemodule[hemistich]
 
 \setuphemistich
  [width=local,
   distance=1\emwidth,
   separator=]
 
   \setuphemistich
  [leftcolor=,
   separatorcolor=,
   rightcolor=]
 
   \setuphemistich
  % [separator=\vl\hskip.25em\vl]
  [separator=]
 
 %% We need separate lines in the export, so use \start|stoplines
 \definestartstop[VERSES][before={\blank[medium]\startlines 
 \noindentation},after={\stoplines \blank[medium]}]
 \starttext
 \startVERSES
 \hemistiches{Become a shunner of your affairs;}{Entrust all affairs to the 
 Decision.}
 \hemistiches{Thus tight spaces will often widen;}{And open spaces will often 
 get tight.}
 \stopVERSES
 \stoptext
 ===
 
 In the output we get
 
 ===
 div
 div class=lines
  div class=linediv class=lineBecome a shunner of your affairs;Entrust 
 all affairs to the Decision./divdiv class=lineThus tight spaces will 
 often widen;And open spaces will often get tight./div/div
 /div
 /div
 ===
 
 Is there anyway to tag and export the distance info:
 
 distance=1\emwidth
 
 so that we can get some space in the xhtml. Note that I do not expect any of 
 the alignment that the hemistiches module provides. Just some reasonable 
 space.
 
 That said: How do I design a \start|stophemistiches environment that would 
 get tagged in the output as such (i.e., div class=hemistiches)?

You have to add tag commands in the source of the module to get tags in the 
exported text.

The distance between both texts in the output can be set with CSS but first you 
need tags.

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] Export: \setuphemistich distance=

2015-03-18 Thread Wolfgang Schuster

 Am 18.03.2015 um 20:45 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 On Wed, 18 Mar 2015 11:51:13 -0600, Wolfgang Schuster 
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote:
 
 
 Am 18.03.2015 um 15:04 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Dear gang,
 
 In the attached, we export hemistiches:
 
 ===
 \setupexport[cssfile=sh_ahmad-qajar.css]
 \setupbackend[export=yes]
 
 \usemodule[hemistich]
 
 \setuphemistich
 [width=local,
  distance=1\emwidth,
  separator=]
 
  \setuphemistich
 [leftcolor=,
  separatorcolor=,
  rightcolor=]
 
  \setuphemistich
 % [separator=\vl\hskip.25em\vl]
 [separator=]
 
 %% We need separate lines in the export, so use \start|stoplines
 \definestartstop[VERSES][before={\blank[medium]\startlines 
 \noindentation},after={\stoplines \blank[medium]}]
 \starttext
 \startVERSES
 \hemistiches{Become a shunner of your affairs;}{Entrust all affairs to the 
 Decision.}
 \hemistiches{Thus tight spaces will often widen;}{And open spaces will 
 often get tight.}
 \stopVERSES
 \stoptext
 ===
 
 In the output we get
 
 ===
 div
 div class=lines
 div class=linediv class=lineBecome a shunner of your 
 affairs;Entrust all affairs to the Decision./divdiv class=lineThus 
 tight spaces will often widen;And open spaces will often get 
 tight./div/div
 /div
 /div
 ===
 
 Is there anyway to tag and export the distance info:
 
 distance=1\emwidth
 
 so that we can get some space in the xhtml. Note that I do not expect any 
 of the alignment that the hemistiches module provides. Just some reasonable 
 space.
 
 That said: How do I design a \start|stophemistiches environment that would 
 get tagged in the output as such (i.e., div class=hemistiches)?
 
 You have to add tag commands in the source of the module to get tags in the 
 exported text.
 
 The distance between both texts in the output can be set with CSS but first 
 you need tags.
 
 Hi Wolfgang,
 
 Can you give an example of adding tag commands to a macro or to a 
 \start-stopcommand? Thanks as always for the clarity and


Something like this should do it for the hemistiches module.

\unexpanded\def\dodohemistiches#1[#2]#3#4%
  {\dontleavehmode
   \begingroup
   \doifassignmentelse{#2}
 {\edef\currenthemistich{#1}%
  \setupcurrenthemistich[#2]}
 {\def\currenthemistich{#2}}%
   \doifelse{\hemistichparameter\c!width}\v!local
 {\scratchwidth\availablehsize}
 {\scratchwidth\hemistichparameter\c!width\relax}%
   \spaceskip\zeropoint\s!plus\plusone\s!fill\relax
+  \dostarttagged\t!division\currenthemistich
   \hbox to \scratchwidth\bgroup
 \scratchwidth.5\dimexpr\scratchwidth-\hemistichparameter\c!distance\relax
 \hbox to \scratchwidth\bgroup
+  \dostarttagged\t!construct\c!lefttext
   \usehemistichstyleandcolor\c!leftstyle\c!leftcolor#3%
+  \dostoptagged
 \egroup
 \hss
 \begingroup
+  \dostarttagged\t!construct\c!separator
   \usehemistichstyleandcolor\c!separatorstyle\c!separatorcolor
   \hemistichparameter\c!separator
+  \dostoptagged
 \endgroup
 \hss
 \hbox to \scratchwidth\bgroup
+  \dostarttagged\t!construct\c!righttext
   \usehemistichstyleandcolor\c!rightstyle\c!rightcolor#4%
+  \dostoptagged
 \egroup
   \egroup
+  \dostoptagged
   \endgroup}

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] MetaPost, specifiy max width of a text?

2015-03-18 Thread Norbert Melzer
Hi there!

Is there a way to specify the with of a text so that the text gets wrapped?
Something simalar to the following TikZ-Example (wrapped in ConTeXt):

```tex
\usemodule[tikz]
\starttext
  \starttikzpicture
\draw (0, 0) node[text width=2.5cm,align=center] {Start new Game};
  \stoptikzpicture

  \startMPcode
draw Start new Game infont defaultfont scaled defaultscale;
  \stopMPcode
\stoptext
```

TIA
Norbert
___
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] MetaPost, specifiy max width of a text?

2015-03-18 Thread Hans Hagen

On 3/18/2015 8:25 AM, Norbert Melzer wrote:

Hi there!

Is there a way to specify the with of a text so that the text gets
wrapped? Something simalar to the following TikZ-Example (wrapped in
ConTeXt):

```tex
\usemodule[tikz]
\starttext
   \starttikzpicture
 \draw (0, 0) node[text width=2.5cm,align=center] {Start new Game};
   \stoptikzpicture

   \startMPcode
 draw Start new Game infont defaultfont scaled defaultscale;
   \stopMPcode
\stoptext


\startMPpage
draw textext(\framed[width=6cm,align={normal,tolerant}]{\input 
tufte\relax}) ;

\stopMPpage



-
  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] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-18 Thread Hans Hagen

On 3/18/2015 7:34 AM, Gerben Wierda wrote:

On 18 Mar 2015, at 02:14, Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl wrote:


On 3/17/2015 10:33 PM, Gerben Wierda wrote:

On 17 Mar 2015, at 16:51, Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl wrote:


On 3/17/2015 3:41 PM, Gerben Wierda wrote:

Nobody?

On 15 Mar 2015, at 22:12, Gerben Wierda gerben.wie...@rna.nl
mailto:gerben.wie...@rna.nl wrote:


Now that I have my book project basically running on mkiv (the
layout probably has a few problems left, the main one currently
being extra whitespace after a chapter heading  compared to mkii),
I’d like to try producing ePUB from it.

ConTeXtgarden says I have to add a backend and points me to the
info on the standard project structure (which I use), but there I
don’t find anything about a backend. The extended example says
that starting january 2015, things have changed with ePUB, which
probably also applies to me as I only recently started with a
fresh download of a current ConTeXt mkiv.

So, can someone tell me what I need to do to get a basic ePUB output?


\setupbackend
 [export=yes]

more on wiki


The wiki doesn’t really help. Am I supposed to create another product
file in …/products?


no, just enable it ... export files end up in a subpath


I did add this to the environment file and tried to create an ePub for
the whole book and for an individual chapter, but no success yet:

luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
mtxrun --script epub --make c_loosely.specification)
Setting /usr/local/src/ConTeXt/tex as ConTeXt root.

mtx-epub| unknown specificaton file
'c_loosely.specification-export/c_loosely.specification-pub' for
'c_loosely.specification'
luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
mtxrun --script epub --make prd_book.specification)
Setting /usr/local/src/ConTeXt/tex as ConTeXt root.

mtx-epub| unknown specificaton file
'prd_book.specification-export/prd_book.specification-pub' for
'prd_book.specification'


What am I missing? What is a specification file?


you process the tex file as normal .. that will produce a specification 
file that will be used if you use mtxrun --script epub later (the call 
is mentioned at the end of a tex run that has the export enabled)


Hans


-
  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] MetaPost, specifiy max width of a text?

2015-03-18 Thread Alan BRASLAU
On Wed, 18 Mar 2015 08:25:50 +0100
Norbert Melzer timmel...@gmail.com wrote:

 \starttext
   \startMPcode
     draw Start new Game infont defaultfont scaled defaultscale;
   \stopMPcode
 \stoptext

draw textext(\framed[frame=off,width=2.5cm,align=middle]{Start new Game});

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
___

Re: [NTG-context] Export: \setuphemistich distance=

2015-03-18 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 18 Mar 2015 11:51:13 -0600, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:




Am 18.03.2015 um 15:04 schrieb Idris Samawi Hamid ادريس سماوي حامد  
isha...@colostate.edu:


Dear gang,

In the attached, we export hemistiches:

===
\setupexport[cssfile=sh_ahmad-qajar.css]
\setupbackend[export=yes]

\usemodule[hemistich]

\setuphemistich
 [width=local,
  distance=1\emwidth,
  separator=]

  \setuphemistich
 [leftcolor=,
  separatorcolor=,
  rightcolor=]

  \setuphemistich
 % [separator=\vl\hskip.25em\vl]
 [separator=]

%% We need separate lines in the export, so use \start|stoplines
\definestartstop[VERSES][before={\blank[medium]\startlines  
\noindentation},after={\stoplines \blank[medium]}]

\starttext
\startVERSES
\hemistiches{Become a shunner of your affairs;}{Entrust all affairs to  
the Decision.}
\hemistiches{Thus tight spaces will often widen;}{And open spaces will  
often get tight.}

\stopVERSES
\stoptext
===

In the output we get

===
div
div class=lines
 div class=linediv class=lineBecome a shunner of your  
affairs;Entrust all affairs to the Decision./divdiv  
class=lineThus tight spaces will often widen;And open spaces will  
often get tight./div/div

/div
/div
===

Is there anyway to tag and export the distance info:

distance=1\emwidth

so that we can get some space in the xhtml. Note that I do not expect  
any of the alignment that the hemistiches module provides. Just some  
reasonable space.


That said: How do I design a \start|stophemistiches environment that  
would get tagged in the output as such (i.e., div  
class=hemistiches)?


You have to add tag commands in the source of the module to get tags in  
the exported text.


The distance between both texts in the output can be set with CSS but  
first you need tags.


Hi Wolfgang,

Can you give an example of adding tag commands to a macro or to a  
\start-stopcommand? Thanks as always for the clarity and


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-18 Thread Gerben Wierda
On 18 Mar 2015, at 02:14, Hans Hagen pra...@wxs.nl wrote:

 On 3/17/2015 10:33 PM, Gerben Wierda wrote:
 On 17 Mar 2015, at 16:51, Hans Hagen pra...@wxs.nl wrote:
 
 On 3/17/2015 3:41 PM, Gerben Wierda wrote:
 Nobody?
 
 On 15 Mar 2015, at 22:12, Gerben Wierda gerben.wie...@rna.nl wrote:
 
 Now that I have my book project basically running on mkiv (the layout 
 probably has a few problems left, the main one currently being extra 
 whitespace after a chapter heading  compared to mkii), I’d like to try 
 producing ePUB from it.
 
 ConTeXtgarden says I have to add a backend and points me to the info on 
 the standard project structure (which I use), but there I don’t find 
 anything about a backend. The extended example says that starting january 
 2015, things have changed with ePUB, which probably also applies to me as 
 I only recently started with a fresh download of a current ConTeXt mkiv.
 
 So, can someone tell me what I need to do to get a basic ePUB output?
 
 \setupbackend
  [export=yes]
 
 more on wiki
 
 The wiki doesn’t really help. Am I supposed to create another product file 
 in …/products?
 
 no, just enable it ... export files end up in a subpath

I did add this to the environment file and tried to create an ePub for the 
whole book and for an individual chapter, but no success yet:

luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex  mtxrun 
--script epub --make c_loosely.specification)
Setting /usr/local/src/ConTeXt/tex as ConTeXt root.

mtx-epub| unknown specificaton file 
'c_loosely.specification-export/c_loosely.specification-pub' for 
'c_loosely.specification'
luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex  mtxrun 
--script epub --make prd_book.specification)
Setting /usr/local/src/ConTeXt/tex as ConTeXt root.

mtx-epub| unknown specificaton file 
'prd_book.specification-export/prd_book.specification-pub' for 
'prd_book.specification'


What am I missing? What is a specification file?

 
 -
  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
 ___

___
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
___