[NTG-context] Two requests for new btx subsystem

2017-10-21 Thread Rik Kabel

Two improvement requests for the new bibliography subsystem:

1. Tag titles (and subtitles) with the language explicitly provided in
   the bib entry.
2. Add editor and translator to fields supported in \cite[field][tag].

An example follows. It shows that the title generated by the 
\cite[title][tag] does not have an associated language, even though the 
bib entry specifies one and the publications manual indicates that this 
is intended for the rendering and hyphenation of the title. It is 
apparently used for that in the bibliography, but it is needed as well 
in the text. (And yes, /Formenwandlungen/ does have the same hyphenation 
points in both German and English; this was just a convenient example.)


It also shows that [translator] is not inserted into the text.

*NOTE* that when \cite[editor][tag] is attempted (and present in the bib 
entry) compilation halts with the Lua error no string to print, but 
continues to completion when allowed.


 \mainlanguage[en]

 \startbuffer[TestBib]
    @BOOK{Tschichold1953,
  author   = {Jan Tschichold},
  title    = {Formenwandlungen der \&-Zeichen},
  year = {1953},
  publisher    = {D. Stempelag},
  address  = {Frankfurt am Main},
  language = {german},
    }
    @BOOK{Plaat1957,
  author   = {Jan Tschichold},
  translator   = {Frederick Plaat},
  title    = {The Ampersand: Its origin and development},
  year = {1957},
  publisher    = {Woudhuysen},
  address  = {London},
  note = {Translation by F.\ Plaat of
   \cite{Tschichold1953}.},
    }
 \stopbuffer

 \loadbtxdefinitionfile[apa]
 \usebtxdataset    [TestBib]
   [TestBib.buffer]
 \definebtxrendering   [TestBib]
   [apa]
   [dataset=TestBib]

 \setupspellchecking   [state=start,
    method=3]
 \definecolor  [word:de]
   [r=.85]

 \starttext
 \startparagraph
 \cite[title][TestBib::Plaat1957]
 is a translation by \cite[translator][TestBib::Plaat1957]
 of \cite[title][TestBib::Tschichold1953]
 by \cite[author][TestBib::Tschichold1953].
 \stopparagraph
 \startparagraph
 {\it The Ampersand: Its origin and development}
 is a translation by Frederick Plaat
 of {\it\de Formenwandlungen der \&-Zeichen}
 by Jan Tschichold.
 \stopparagraph
 \blank[big]

 \placebtxrendering[TestBib][method=dataset]
 \stoptext

--

Rik

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Page printed upside down

2017-10-21 Thread Fabrice Couvreur
Hi Pablo,
Sorry for the late response. I did some tests before answering to
understand your explanations.

- With the commands \ setuppapersize [A4, landscape] and \
setupinteractionscreen [option = landscape] and without selecting anything
in Acrobat, I get the desired double-sided document

- With the command \ setupinteractionscreen [option = landscape] and
without selecting anything in Acrobat, I get a document in double-sided
portrait mode but the back side is upside down

- With the command \ setuppapersize [A4, landscape] and without selecting
anything in Acrobat, I get two documents in landscape mode in the same
direction

I think it's clear now, thank you.

I did a try to get a booklet but the result is not correct because the text
or formulas of mathematics are overflowing in the colums

###
document.tex
###

\definemixedcolumns
  [MyColumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMyColumns
  \dorecurse{6}{\input knuth}

\startformula
\startmathalignment[n=2,align={left,left}]
\NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times
1,05^2 + \dots + 400 \times 1,05^{11}\NR
\NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
\NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
\stopmathalignment
  \stopformula

\stopMyColumns
\stoptext


Fabrice

2017-10-18 18:44 GMT+02:00 Pablo Rodriguez :

> On 10/18/2017 06:00 PM, Fabrice Couvreur wrote:
> > Hi,
> > With this
> >
> > \setuppapersize[A4,landscape]
> > \setupinteractionscreen[option=landscape]
> >
> > I get a double-sided page that I can read without having to return the
> > page on the back. But I wish I could fold the sheet to have a booklet.
> >
> > Difficult to explain without showing. Is it possible ?
>
> Hi Fabrice,
>
> for a booklet I would recommend imposition.
>
> 1. Generate the document in the standard way (no landscape).
>
> 2. Impose it using the following code:
>
> \setuppapersize [A5][A4,landscape]
> \setupexternalfigures[interaction=all]
> \enabledirectives[references.border]
> \setuparranging [2UP]
> \setuplayout
>   [backspace=0pt,
> topspace=0pt,
>width=middle,
>   height=middle,
> location=middle,
>   header=0pt,
>   footer=0pt]
> \setupinteraction[state=start]
> \setupinteractionscreen[option={landscape, fixed, paper}]
> \starttext
> \insertpages[document.pdf][width=0pt]
> \stoptext
>
> A sample for document would be:
>
> \setupbodyfont[600pt]
> \starttext
> \dorecurse{4}{\startstandardmakeup[style={\bf\ss}, align=center]
> \recurselevel
> \stopstandardmakeup}
> \stoptext
>
> Althought the paper size from the document is A4, imposition handles it
> as A5, so it works fine.
>
> BTW, page order in the final booklet is different (you may see it
> yourself :-)).
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] three issues with \setuptyping

2017-10-21 Thread Pablo Rodriguez
Hans,

[I have reported this before the meeting, but it was wiser to wait after
the meeting was over.]

I have the following sample:

%~ \usemodule[scite]
\starttext
\startTEXpage[offset=2em]
\startTEX
This is text. % a comment, not \comment
\stopTEX

\startXML
This is text.
\stopXML

\startLUA
if code=="code" then --this is a comment

--[[
this is a

multiline comment
--]]

not part of the comment

---[[
this isn’t a

multiline comment
---]]
\stopLUA
\stopTEXpage
\stoptext

I’m experiencing three issues:

1. Both TeX and Lua comments only mark (in bold and darkyellow) the
comment character, but not the comment content.

2. Multiline Lua comments remove the first line break after the comment
begins. Brackets are also affected from first issue.

3. XML comment characters are marked as standard tags.

Using the scite module removes the three issues (XML comment chars are
in a different color, both from comment content and from any other
element). But the scite module doesn’t allow the options \setuptyping has.

Would it be possible that whole comments may be formatted in the same
color and font (TeX, Lua and XML)?

Could you fix the issue with removed line break in multiline comments?

Many thanks for your help,

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___