Re: [NTG-context] Inkscape command line arguments have changed

2020-05-19 Thread Thangalin
As a work around, rename /usr/bin/inkscape to new-inkscape, such as:

# mv /usr/bin/inkscape /usr/bin/new-inkscape

Then change /usr/bin/inkscape to intercept and replace the command
line argument:

#!/usr/bin/env bash
/usr/bin/new-inkscape \
  $(echo "$@" | sed 's/--export-pdf/--export-type=pdf --export-filename/')

Then make sure the shell script is executable:

chmod +x /usr/bin/inkscape

This produces the expected results:

graphics> inclusion > checking conversion of 'genealogy-sm',
fullname 'images/genealogy-sm.svg', old format 'svg', new format
'pdf', conversion 'default', resolution 'default', arguments ''
graphics> inclusion > converting 'genealogy-sm'
('images/genealogy-sm.svg') from 'svg' to 'pdf'
graphics> inclusion > new graphic, using hash
'images/m_k_i_v_genealogy-sm.svg.pdf->1->crop->->->default->default->default'

Stay safe everybody.
___
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] Inkscape command line arguments have changed

2020-05-19 Thread Thangalin
Minor correction:

\startluacode
figures.programs.inkscape={
  command="inkscape",
  pdfargument=[[
"%oldname%"
--export-dpi=600
--export-type=pdf
--export-filename="%newname%"
  ]],
  pngargument=[[
"%oldname%"
--export-dpi=600
--export-type=png
--export-filename="%newname%"
  ]],
}
\stopluacode

Still doesn't work, though. ConTeXt persists with using --export-pdf=...
Cheers!
___
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] Inkscape command line arguments have changed

2020-05-19 Thread Thangalin
$ inkscape --version
Inkscape 1.0 (4035a4fb49, 2020-05-01)
Pango version: 1.44.7

With the new release of Inkscape, --export-pdf no longer exists. The
new options appear to be:

  --export=type=pdf
  --export=pdf-version=1.5 (or 1.4)
  --export-filename=filename.pdf

Aditya has shown a work-around on TeX.SE. I've changed the code a little:

\startluacode
figures.programs.inkscape={
  command="inkscape",
  pdfargument=[[
"%oldname%"
--export-dpi=600
--export=type=pdf
--export-filename="%newname%"
  ]],
  pngargument=[[
"%oldname%"
--export-dpi=600
--export=type=png
--export-filename="%newname%"
  ]],
}
\stopluacode

Unfortunately, this does override outdated command line argument.
ConTeXt appears to pass in the old argument:

context --purgeall --trackers=graphics.conversion filename.tex

Shows:

Unknown option --export-pdf=images/m_k_i_v_genealogy.svg.pdf

How would you replace the export-pdf option for the new version of Inkscape?

(I'll send a bug to the Inkscape issue tracker; it strikes me that
--export-pdf could have remained an alias.)

Thank you!
___
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] Blank page added after pagecolumns

2020-05-10 Thread Thangalin
Bump.

See also: https://tex.stackexchange.com/q/542993/2148

On Mon, May 4, 2020 at 11:46 AM Joey McCollum
 wrote:
>
> After continuing to look into this a bit, I noticed that a similar issue 
> involving the insertion of a blank page after a columnset environment has 
> been discussed on the mailing list in the thread "Blank page inserted when 
> text reaches column's end" (dated 08 Dec 2019). In that thread, a proposed 
> solution was to redefine the \page_grd_stop macro found in page-cst.mkiv as 
> follows:
>
> ```
> \unprotect
> \def\page_grd_stop{%
>   \endgraf % needed, else wrong vsize in one par case
>   \vfill % otherwise weird \placenotes[endnotes]
>   \page_grd_command_set_vsize % needed
>   \penalty\c_page_otr_eject_penalty
>   %\page_grd_command_flush_page
>   \page_otr_fill_and_eject_page
>   \page_grd_command_set_vsize % why here
>   \egroup
>   \page_otr_command_set_vsize
>   \page_otr_command_set_hsize
> }
> \protect
> ```
>
> Unfortunately, this approach was found to have potential issues in that 
> thread, and it does not fix the problem with pagecolumns in my MWE. Are 
> pagecolumns commands aliased to pagegrid commands like columnset commands 
> are, or are they defined somewhere else? I checked page-col.mkiv, but it 
> seems to be too short to be the file that defines pagecolumns behavior.
>
> Joey
>
> On Sat, May 2, 2020 at 11:46 AM Joey McCollum  
> wrote:
>>
>> I recently found the pagecolumns manual 
>> (http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in several 
>> of the examples (including those for side floats and footnotes), the 
>> addition of a blank page after the end of the pagecolumns environment also 
>> seems to occur. So when the manual says, "We always start at a new page and 
>> end on a new one," does it mean that this is a feature of pagecolumns? And 
>> if so, is there any way to disable it? I have no problem with a page break 
>> after the end of the pagecolumns environment, but an empty page added after 
>> the break seems unnecessary. I checked for a wiki page on the 
>> \definepagecolumns command to get more information on its accepted inputs, 
>> but there doesn't appear to be a page for this command.
>>
>> Joey
>>
>> On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum  
>> wrote:
>>>
>>> I am typesetting a document using pagecolumns to ensure that my footnotes 
>>> are set ragged-bottom in columns. I have observed some unexpected behavior 
>>> whenever the last column on a page is left incomplete: a blank page is 
>>> added at the end of the document. A minimal working example follows:
>>>
>>> ```
>>>
>>> \starttext
>>>
>>> \startpagecolumns[n=2]
>>>
>>> \dorecurse{3}{\par\input zapf}
>>>
>>> \stoppagecolumns
>>>
>>> \stoptext
>>>
>>> ```
>>>
>>> I typeset this using ConTeXt version 2020.03.10, as released with TeXLive 
>>> 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or 
>>> \dorecurse{6} (so that the text ends in the first column of a page), then 
>>> there is no problem. I have tried to fix this by specifying page=no in the 
>>> \startpagecolumns arguments, but it did not change anything. Is there 
>>> something else I am missing?
>>>
>>> Thank you,
>>>
>>> Joey
>
> ___
> 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
___


Re: [NTG-context] image across 2 page spread

2020-04-29 Thread Thangalin
Would something like this work?

\setupbackgrounds[page][
  background={BookIllustrationLayer},
]

\definelayer[BookIllustrationLayer][
  width=\paperwidth,
  height=.5\paperheight,
  y=.5\paperheight,
  position=no,
  repeat=no,
]

  \setlayer[BookIllustrationLayer]{%
\clip[x=\doifelseoddpage{2}{1}]{%
  \externalfigure[filename][
width=2\paperwidth,
height=.5\paperheight]%
}%
  }%

On Wed, Apr 29, 2020 at 5:05 PM jbf  wrote:
>
> Hi list,
>
> With 99% of work complete on a book, including single page images, I now find 
> myself confronted with a final problem: how to run one image across facing 
> pages or in other words, one image (plus its caption) across a two-page 
> spread, such that there is no gap.
>
> I have tried a number of fairly crass attempts (obviously too simple) to see 
> if I could get somewhere near what I want, e.g.
>
> \externalfigure[plate12.jpg][width=\paperwidth, height=.7\paperheight, 
> frame=none] {\tfx \sc Plates 12, 13. \tfx Twenty trucks from the Netherlands 
> setting off}
>
> \externalfigure[plate13.jpg][width=\paperwidth, height=.7\paperheight, 
> frame=none] {\tfx for their first mission amongst the German diaspora.}
>
> My thinking here was that \paperwidth might help extend the image to the 
> inner edge on the left-hand page, but it doesn't work that way for the 
> right-hand page, since there it extends to the outer edge, not the inner 
> edge! The .7\paperheight was to provide room for the caption. But all in all, 
> this is no solution!
>
> If it is any help, the setup dimensions for the book are US Digest:
>
> \definepapersize
>   [ACN][width=5.5in,height=8.5in] %  w140mm x h216mm
>
> I then looked up how one might do it in LaTeX, and found the following link: 
> https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right
>
> How much of that would be transferable to ConTeXt? (I am thinking 
> particularly of the \newcommand*{\twopagepicture}[4] bit.
>
> There are explanations for how to do this in InDesign, and since it is 
> something someone might often want to do (e.g. in magazines), I also thought 
> it might be easier to find reference to it on Contextgarden, yet haven't 
> found anything there. But I am sure ConTeXt has a way to do this.
>
> Could someone point me in the right direction with this please?
>
> Julian
>
> ___
> 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
___


Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Thangalin
Hi Jan,

> 1. Nameing and organizing the project, product and environments files. I
> am currently reorganising the files for my cooperative. I think that
> besides some nameing conventions it is more or less up to me how I
> organise our print work. Any recommendations welcome.

Download "themes.zip" from the blog post. It shows some naming
conventions and relationships between projects, products,
environments, and components.

> books. What I am looking for is a script to extract all XML tags/tokens
> from their files to have a complete list of things that should be
> handled in a ConTeXt style file. Five years ago I tried to create such a
> style file by hand, but I gave up.

XSL was designed specifically to parse XML. ConTeXt has facilities for
mapping XML tokens, as you've used. Depending on the complexity of
what you're trying to accomplish, take a look at "book.zip" from the
blog post. Inside you'll find "se2md.xsl"; a similar approach could
work for TEI: put the complexity of parsing TEI into XSL, then use
ConTeXt to typeset the resulting 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Thangalin
Jan-Erik, after you have installed all the required software (and
fonts!) and unzipped the book.zip and themes.zip archives, you can
build a book using:

cd $HOME/dev/writing/book
./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
-b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde

This is noted at the bottom of the preamble section.

Enjoy!

On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
 wrote:
>
> Is there a running example ? I’m not sure how to fill in the commandline
>
>
>
> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>
> Yes, the naming is completely up to you.
>
> I use:
>
> project_something.tex
> env_something.tex
> prd_oneissue.tex
> c_onechapter.tex
>
> That’s also what my script supports as default:
> https://github.com/fiee/tools/blob/master/contextproject.py
>
>
> ___
> 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] Typesetting Markdown - Part 8

2020-04-27 Thread Thangalin
Hi folks!

Second last part in the series. The project, product, component, and
environment relations were a bit finicky. Those willing to point out
improvements that can be made---Hans, Taco, Wolfgang, Aditya, and
others---would be very much appreciated.

Specifically, it seems that some project environment settings can be
overruled inside products, but other project settings cannot. It's not
really clear to me whether this is due to dependency order or that
definitions cannot be redefined across environments. Thoughts?

https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdown-part-8/

Stay safe!
___
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] Project Gutenberg Projects

2020-04-12 Thread Thangalin
Hi list!

Another blog post for you all, tangentially related to ConTeXt:

https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects

In particular, the conversion from XHTML to Markdown so that pandoc
can convert Markdown to ConTeXt may be of interest:

https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects/#xhtml-to-markdown

This is in preparation for part 8 of the typesetting Markdown series,
which discusses how ConTeXt can be used to typeset annotations in
pandoc's extended Markdown. If there's anything else you'd like to
see, let me know.

Cheers!
___
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] Capitalize first word of first line within \startlines

2020-03-04 Thread Thangalin
If it helps, here's why I thought it would work:

https://wiki.contextgarden.net/Command/definefirstline

The wiki page shows that the macro takes a style option. The style
option links to:

https://wiki.contextgarden.net/Style_Alternatives

This page has a list of predefined styles and describes how to set up
an alternative style:

https://wiki.contextgarden.net/Style_Alternatives#Defining_a_Style_Alternative

From the wiki page:

\definealternativestyle [head:neat]   [\WORD]   []

While \definealternativestyle[PoemFirstWord][{\bf\uppercasing}][] will
work for my needs, I am concerned that it is inconsistent wrt wiki
documentation, and also appears to expose an inconsistent API, as it
were. Is there any way to make the two conform to the same usage? That
is, it was not obvious (from the wiki) that I could not use "WORD" as
an alternative style even though it is literally listed and used as an
alternative style.

Thanks again!
___
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] Capitalize first word of first line within \startlines

2020-03-04 Thread Thangalin
Looking to uppercase the first word of a poem:

\setupindenting[yes, 0.75em]

\setupinitial[
  state=start,
  n=2,
  distance=\zeropoint,
]

% This does not appear to work?
\definealternativestyle[PoemFirstWord][\WORD][]

\definefirstline[PoemFirstLine][
  alternative=word,
  style=PoemFirstWord,
  n=1,
]

\definestartstop[poem][
  before={\startlines \setfirstline[PoemFirstLine] \placeinitial},
  after={\stoplines},
]

\setuplines[indenting=odd]

\starttext
\startpoem
Some say the world will end in fire,
Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great,
And would suffice.
\stoppoem
\stoptext

Any ideas why the first word is not capitalized?

Thank you!
___
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] Impacts Project: Two-Page Spread

2020-01-14 Thread Thangalin
Hi all!

Pleased to share with you a new two-page spread of the Impacts project:

https://impacts.to/downloads/lowres/impacts-dual.pdf

Best viewed in "Dual" (or "Even Spreads") mode. Compare with the
original single-page spread:

https://impacts.to/downloads/lowres/impacts.pdf

If you'd like a hard-copy, please sign up at: https://impacts.to/

The document is written in pandoc-flavoured markdown. ConTeXt, TeX,
and Lua code are used to accomplish various stylish feats:

* Page setup (bleed, margins, text safe zones)
* Override page flushing for columnsets
* Timeline indicator line based on section heading numeric text value
* Lua converts annotated Markdown to an inline image ConTeXt macro
* Clipped background images for pixel-perfect two-page spread
* Custom global counter to enumerate illustrations in TeX

Annotations will be explained in Part 8 of the Typesetting Markdown series:

https://dave.autonoma.ca/blog/

Feedback on any of this is very welcome and, again, thank you for all
the support over the years.

Cheers!
___
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] GraphicsMagick corrupts TIFF upon PDF conversion

2019-12-15 Thread Thangalin
FYI, there appears to be a bug with GraphicsMagick.

gm convert -density 600x600 illustration.tif m_k_i_v_illustration.tif.pdf

Produces:

38812848 Dec 15 22:51 m_k_i_v_illustration.tif.pdf
https://i.imgur.com/EByrH6r.png

Whereas ImageMagck:

convert -density 600x600 illustration.tif m_k_i_v_illustration.tif.pdf

Produces:

42343236 Dec 15 22:52 m_k_i_v_illustration.tif.pdf
https://i.imgur.com/9DxRVW2.png

Re: https://wiki.contextgarden.net/Using_Graphics#Image_Conversion

Since GraphicsMagick is used by ConTeXt, is there a way to force
ConTeXt to use ImageMagick instead?

Thank you!
___
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] Blank page inserted when text reaches column's end

2019-12-10 Thread Thangalin
Commenting out the \page_grd_command_flush_page macro seems to have
reversed the effect. Any pages having columnar text that does not
extend to the last line are now suppressed. How would I go about
adding a conditional that checks to see whether the column is filled
before deciding if a page break is necessary?

\unprotect
\def\page_grd_stop{%
  \endgraf % needed, else wrong vsize in one par case
  \vfill % otherwise weird \placenotes[endnotes]
  \page_grd_command_set_vsize % needed
  \penalty\c_page_otr_eject_penalty
  %\page_grd_command_flush_page
  \page_otr_fill_and_eject_page
  \page_grd_command_set_vsize % why here
  \egroup
  \page_otr_command_set_vsize
  \page_otr_command_set_hsize}
\protect

Thank you!
___
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] Blank page inserted when text reaches column's end

2019-12-09 Thread Thangalin
Thank you both. Neither approach removes the blank page with either
version 2019.06.11 or 2019.12.06 on Linux. Is there a specific version
of ConTeXt required? The code to generate the document resembles:

\setuppagenumbering[alternative=doublesided,page=no]
\installpagebreakhandler{last}{}

\setuplayout[grid=yes]

\starttext
  \startcolumnset[n=2]
\input knuth \input lorem \input lorem \input knuth
\dorecurse{3}{No TV and no beer make Homer something something.}
  \stopcolumnset
\stoptext

The second page remains, regardless of doublesided/singlesided or
pagebreakhandler.

Henri Menke pointed out that "page-cst.mkiv" contains an explicit line
break associated with stoppagegrid:

https://github.com/contextgarden/context-mirror/blob/f74c4055713ab52a11d12435eb04040ec6553129/tex/context/base/mkiv/page-cst.mkiv#L199-L201

Could this be grid itself be problematic?

Cheers!
___
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] Blank page inserted when text reaches column's end

2019-12-08 Thread Thangalin
When text reaches the end of a column, it appears to trigger inserting
a blank page. In the following code, \dorecurse{3} causes a blank page
to appear but \dorecurse{2} does not. The only difference is that when
set to 3, the additional text is written on the last line of the last
column. This scenario results in a blank page.

Any ideas how the blank page can be suppressed?

\showgrid
\setuplayout[grid=yes]

\starttext
  \startcolumnset[n=2]
\input knuth \input lorem \input lorem \input knuth
\dorecurse{3}{No TV and no beer make Homer something something.}
  \stopcolumnset
\stoptext

Version:

$ context --version
mtx-context | ConTeXt Process Management 1.03
mtx-context |
mtx-context | main context file:
/opt/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2019.06.11 19:20

Thank you!
___
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] Suppress blank page in asymmetrical multicolumn layout

2019-12-06 Thread Thangalin
Hi there,

How do I suppress the blank page in the following document while
maintaining the asymmetrical multicolumn layout? The problem centres
around "page=yes," whereby removing it eliminates the blank page, but
then wreaks havoc on the document layout.

\definepapersize[BookPaperSize][width=24in, height=12in,]
\setuppapersize[BookPaperSize]

\definelayout[BookTextLayout][
  topspace=.5in,
  backspace=.5in,
  header=\zeropoint,
  footer=\zeropoint,
  grid=yes,
]
\setuplayout[BookTextLayout]

\definecolumnset[BookColumns][n=4,distance=.25in]
\setupcolumnset[BookColumns:1][width=11.75in]
\setupcolumnset[BookColumns:2][width=3.46in]
\setupcolumnset[BookColumns:3][width=3.46in]
\setupcolumnset[BookColumns:4][width=3.46in]

\setuphead[section][
  page=yes,
  beforesection={\startcolumnset[BookColumns]},
  aftersection={\stopcolumnset},
]

\setuphead[subsection][
  after={\column},
]

\setuphead[subsubsection][
  after={\blank[small]},
]

\starttext
\startsection[title={Section Title}]
\startsubsection[title={Subtitle}]
\dorecurse{2}{\input knuth}

\dorecurse{2}{%
  \startsubsubsection[title={Subsubtitle}]
\dorecurse{1}{\input ward}
\dorecurse{2}{\input lorem}
\dorecurse{1}{\input bryson}
  \stopsubsubsection
}

\stopsubsection
\stopsection
\stoptext

Thank you!
___
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] Impacts Project

2019-12-05 Thread Thangalin
Hi list!

Thank you for helping to answer so many questions and remove so many
roadblocks with my project. The result is a photobook written in
Markdown, piped through pandoc to generate ConTeXt code, then stylized
using a series of .tex files.

The coolest ConTeX part, IMO, is the orange dot in the timeline. Using
MetaPost, the date for the timeline is read directly from the
document, then plotted relative to the \overlaywidth. Changing the
date in the Markdown document winds up repositioning the timeline dot
automagically.

https://impacts.to/

The book is going to be released under a CC BY 4.0 license, including
all the source code necessary to generate the book. Meanwhile, if
anyone is interested in nabbing a copy of the PDF, let me know
(preferably via the web form).

Again, my sincerest gratitude, this project would have been a much
more time-consuming and arduous journey without your generous help.
___
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] Typesetting Markdown – Part 7: Mathematics

2019-08-06 Thread Thangalin
https://dave.autonoma.ca/blog/2019/08/06/typesetting-markdown-part-7/

This installment tackles a cost-benefit analysis problem comparing
electric to gasoline-powered vehicles, calls into R for amortization,
typesets math and a repayment schedule, continues to explore the
separation of content from presentation, and expands on the shell
scripts from previous parts.

Feedback is welcome, especially about the ConTeXt-related items (see
Style and Math near the bottom).

Thanks for reading!
___
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] Theses Examples

2019-07-15 Thread Thangalin
Hi all!

I know of two people who are considering writing their theses using
ConTeXt. I've started to update the wiki with a list:

https://www.contextgarden.net/Sample_documents#Theses

Any others to add to the list?

Thank you.
___
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] Typesetting Markdown – Part 6: Computation

2019-07-11 Thread Thangalin
This part of the series describes a way to produce and typeset dynamic
documents using R Markdown and ConTeXt.

https://dave.autonoma.ca/blog/2019/07/11/typesetting-markdown-part-6/

Comments or suggestions for improvement?
___
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] Split extreme tables across pages

2019-07-10 Thread Thangalin
Got it.

\setupfloat[table][default={here,split}]

See: https://wiki.contextgarden.net/Command/setupfloat#Example

On Wed, Jul 10, 2019 at 7:32 PM Thangalin  wrote:
>
> Sorry! The subject line should be, "Split extreme tables across pages"...
>
> > This does the job, but it doesn't feel like the ConTeXt way.
> >
> > How would you use setups to enable page splitting on extreme tables?
> >
> > Thank you!
___
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] Split extreme tables across pages

2019-07-10 Thread Thangalin
Sorry! The subject line should be, "Split extreme tables across pages"...

> This does the job, but it doesn't feel like the ConTeXt way.
>
> How would you use setups to enable page splitting on extreme tables?
>
> Thank you!
___
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] Split extreme tables across tables

2019-07-10 Thread Thangalin
The following document does not split across tables, which is a little
surprising:

\starttext
\startplacetable[title={Average Annual Temperatures}]
\startxtable
\startxtablehead[head]
\startxrow
\startxcell[align=middle,width={0.10\textwidth}] Year \stopxcell
\startxcell[align=middle,width={0.14\textwidth}] Value \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\dorecurse{100}{%
\startxrow
\startxcell[align=middle,width={0.10\textwidth}] 1880 \stopxcell
\startxcell[align=middle,width={0.14\textwidth}] 0.1146 \stopxcell
\stopxrow}
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell[align=middle,width={0.10\textwidth}] 2018 \stopxcell
\startxcell[align=middle,width={0.14\textwidth}] 1.014 \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable
\stoptext

I'd have thought the default behaviour would be to split because the
alternative is for the table content to scroll into the footer and off
the page.

A fix is to use:

\startplacetable[title={Average Annual Temperatures}, location={split}]

However, when the document is generated using pandoc, injecting
location={split} is not feasible.

It would be convenient if there was a way to use setups to override
the location option for \startplacetable. Henri Menke provided a work
around:

let\oldstartplacetable\startplacetable
\unexpanded\def\startplacetable{\dosingleempty\newstartplacetable}
\def\newstartplacetable[#1]{\oldstartplacetable[#1,location={split}]}

See: https://tex.stackexchange.com/a/499453/2148

This does the job, but it doesn't feel like the ConTeXt way.

How would you use setups to enable page splitting on extreme tables?

Thank you!
___
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] Typesetting Markdown – Part 5: Interpolation

2019-07-09 Thread Thangalin
That's another intriguing approach, Andrés, thank you.

The approach faces some hurdles. First, the template file (main.tex) is
written in ConTeXt, so it never sees the YAML variables, nor can it be used
to interpret pandoc's conditional expressions. Second, moving the
\completecontent macro out of main.tex and into Markdown (e.g., 01.md,
being the first chapter) so that the conditional expression can be
evaluated using pandoc mixes content with presentation logic.

Modes are a good approach in this case because the "context" command can
take a "mode" command-line argument. This provides presentation controls
that neither the YAML nor the Markdown need consider. Adding presentation
logic to the ConTeXt template (i.e., introducing \startmode and
\startnotmode into main.tex) is acceptable because ConTeXt is wholly
responsible for the appearance of the final document. See:
https://wiki.contextgarden.net/Modes

This then allows development of command-line arguments from shell scripts
to control how the document is presented when built, which is a little bit
more flexible than maintaining YAML variables. Also, ideally, the YAML
variables would be used for controlling only content, not presentation
logic.

Thanks again, Andrés.

On Mon, Jul 8, 2019 at 11:27 AM Andres Conrado 
wrote:

> You can do it on the template... you can use a yaml variable to determine
> if the toc should be printed or not. Like so:
>
> yaml file:
> ---
> toc: true
> ...
>
> template file:
> %%%
> $if(toc)$
> \completecontent
> $endif$
> %%%
>
>
> Andrés Conrado Montoya
> http://chiquitico.org
>
>
> El lun., 8 jul. 2019 a las 2:52,  escribió:
>
>> Send ntg-context mailing list submissions to
>> ntg-context@ntg.nl
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>> ntg-context-requ...@ntg.nl
>>
>> You can reach the person managing the list at
>> ntg-context-ow...@ntg.nl
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>>
>>
>> Today's Topics:
>>
>>1. Re:  Typesetting Markdown – Part 5: Interpolation
>>   (Aditya Mahajan)
>>2. Re:  Typesetting Markdown – Part 5: Interpolation (Thangalin)
>>3. Re:  Typesetting Markdown – Part 5: Interpolation
>>   (Aditya Mahajan)
>>4. request for \definefontfamily and \definefallbackfamily
>>   (Pablo Rodriguez)
>>5. Re: crappy names in the fontloader (Hans Hagen)
>>6. problems with images, layers and crop marks (Henning Hraban Ramm)
>>7. Re: problems with images, layers and crop marks (Hans Hagen)
>>
>>
>> --
>>
>> Message: 1
>> Date: Sun, 7 Jul 2019 10:17:31 -0400 (EDT)
>> From: Aditya Mahajan 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
>> Interpolation
>> Message-ID: 
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> On Sat, 6 Jul 2019, Thangalin wrote:
>>
>> > Hello again!
>> >
>> > This part of the series describes how to reference *interpolated*
>> strings
>> > inside Markdown documents.
>> > https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
>> >
>> > There's a section at the end about eliminating the table of contents
>> from a
>> > reusable document template. I would have preferred using setups, rather
>> > than redefining the \completecontent macro, but didn't see an obvious
>> way
>> > to do so.
>>
>> Why not simply omit \compltecontent from the pandoc template?
>>
>> Aditya
>>
>>
>>
>> --
>>
>> Message: 2
>> Date: Sun, 7 Jul 2019 11:58:12 -0700
>> From: Thangalin 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
>> Interpolation
>> Message-ID:
>> > g...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Thank you Aditya.
>>
>> The main.tex file is meant to be reusable for different document styles.
>> By
>> removing \completecontent altogether from the main template, it would
>> preclude a different document from reusing the main.tex template with a
>> table of contents. I'd like the template to be "re

Re: [NTG-context] Typesetting Markdown – Part 5: Interpolation

2019-07-08 Thread Thangalin
Thanks again for the great ideas. The downside is that it comes with a lot
of extra ConTeXt setup code. My understanding is that the toc parameter to
pandoc only works when creating a standalone document. I think
\def\completecontent\empty is a bit more expressive of intent than
\def\completecontent{}. Modes are probably the way to go, though.

Thank you.

On Sun, Jul 7, 2019 at 12:18 PM Aditya Mahajan  wrote:

>
> On Sun, 7 Jul 2019, Thangalin wrote:
>
> > Thank you Aditya.
> >
> > The main.tex file is meant to be reusable for different document styles.
> By
> > removing \completecontent altogether from the main template, it would
> > preclude a different document from reusing the main.tex template with a
> > table of contents. I'd like the template to be "reusable"; making
> > modifications to "main.tex" --- or creating a copy --- would subvert that
> > goal.
>
> Pandoc allows that. For example, see line 140 of the default context
> template:
>
> https://github.com/jgm/pandoc-templates/blob/master/default.context
>
> I don't remember the exact command line parameters for pandoc that set
> the toc flag to true.
>
> An equivalent method will be to control this using a ConTeXt mode.
> Redefining \completecontent to \empty seems too drastic.
>
> 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://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
___


Re: [NTG-context] Typesetting Markdown – Part 5: Interpolation

2019-07-07 Thread Thangalin
Thank you Aditya.

The main.tex file is meant to be reusable for different document styles. By
removing \completecontent altogether from the main template, it would
preclude a different document from reusing the main.tex template with a
table of contents. I'd like the template to be "reusable"; making
modifications to "main.tex" --- or creating a copy --- would subvert that
goal.

On Sun, Jul 7, 2019 at 7:17 AM Aditya Mahajan  wrote:

> On Sat, 6 Jul 2019, Thangalin wrote:
>
> > Hello again!
> >
> > This part of the series describes how to reference *interpolated* strings
> > inside Markdown documents.
> > https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
> >
> > There's a section at the end about eliminating the table of contents
> from a
> > reusable document template. I would have preferred using setups, rather
> > than redefining the \completecontent macro, but didn't see an obvious way
> > to do so.
>
> Why not simply omit \compltecontent from the pandoc template?
>
>
>
___
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] Typesetting Markdown – Part 5: Interpolation

2019-07-06 Thread Thangalin
Hello again!

This part of the series describes how to reference *interpolated* strings
inside Markdown documents.
https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/

There's a section at the end about eliminating the table of contents from a
reusable document template. I would have preferred using setups, rather
than redefining the \completecontent macro, but didn't see an obvious way
to do so.

Thoughts?
___
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] Typesetting Markdown – Part 4: Theme Style

2019-06-23 Thread Thangalin
Hi all!

This part of the series describes a way to define colours, fonts, and
layout such that content is separated from presentation.

https://dave.autonoma.ca/blog/2019/06/23/typesetting-markdown-part-4/

Questions, corrections, and improvements are welcome.
___
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] Typesetting Markdown -- Part 3

2019-06-17 Thread Thangalin
> Maybe some instructions as how to adjust/redefine the pandoc output?

Please elaborate.

> e.g. how to include different style templates for ConTeXt.

Definitely. Part 4 will be about themes.

Thank you!
___
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] Typesetting Markdown -- Part 3

2019-06-16 Thread Thangalin
Hi all!

The third part of the series describes a way to perform continuous
integration when writing Markdown that is typeset using ConTeXt.

https://dave.autonoma.ca/blog/2019/06/16/typesetting-markdown-part-3/

Suggestions for improvement are welcome.

Thank you.
___
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] Typesetting Markdown -- Part 2

2019-05-30 Thread Thangalin
>
> sense to check all these mappings onto context, for instance I think
> that pandoc uses \section and such while in fact it should use
> \startsectionlevel[title={}] ... \stopsectionlevel so that one can embed
> documents in other documents.
>

https://github.com/jgm/pandoc/issues/5539

Feel free to add comments to the issue.
___
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] Typesetting Markdown -- Part 2

2019-05-29 Thread Thangalin
Hi all,

The second part describes how to create a PDF file from a Markdown file
using pandoc and ConTeXt:
https://dave.autonoma.ca/blog/2019/05/29/typesetting-markdown-part-2/

If anyone has suggestions to improve the ConTeXt-related portions, please
pass them along.

I've considered using ConTeXt's Markdown module, but I'm not sure how much
of Pandoc's enhanced Markdown it supports.

Thank you!
___
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] Typesetting Markdown

2019-05-25 Thread Thangalin
> For Markdown --> ConTeXt usage, math is not my primary concern, but
> wonder what do you think about the Pandoc's "cons" as stated on
> pandoc-xhtml site, iow:
>
> * Main document language information.
> * Markup for language in text portions.
> * Any  or  elements markup.
>

For the document language, Pandoc provides language variables:

https://pandoc.org/MANUAL.html#language-variables

I haven't tried it, so I don't know if it'll handle variations on quotes or
hyphenation, but that strikes me as more a presentation layer aspect than a
content aspect. That is, ConTeXt (or LaTeX), given a language, is
responsible for showing the correct representation; whereas, Markdown is
responsible for the prose.

Intermixing languages is also possible, as per the above link.

Lastly, the above link also shows how to mark up div elements. I'll cover
how to create inline images later in the series---it requires a little bit
of Lua, depending on the complexity of the problem. See:

https://pandoc.org/MANUAL.html#divs-and-spans

Cheers!
___
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] Typesetting Markdown

2019-05-23 Thread Thangalin
Hi Gour,

I added an abstract, an overview section with the plan, and an RSS feed:

https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/

One of the reasons I chose Pandoc's Markdown is for its support of classes
and annotations. I looked into the pandoc-xhtml link and it looked both
incomplete and lacking support for typesetting mathematics.

Have a read and let me know what you think!

Thank you for the feedback.
___
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] Typesetting Markdown

2019-05-22 Thread Thangalin
Hi folks!

I'm thinking about writing a series of blog posts about how to typeset
Markdown using ConTeXt. I've written the first part and am wondering if
anyone would be interested in reading more:

https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/

Thank you!
___
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] columnset vs columns

2018-12-22 Thread Thangalin
Minimal example:

\definepapersize[PaperSize][
  width=400mm,
  height=100mm,
]

\setuppapersize[PaperSize]

\starttext
  \startcolumnset[n=3]
\dorecurse{3}{\input knuth}
  \stopcolumnset
\stoptext

The old-columnsets module fails with an error. The following works as
expected:

\definepapersize[PaperSize][
  width=400mm,
  height=100mm,
]

\setuppapersize[PaperSize]

\starttext
  \startcolumns[n=3]
\dorecurse{3}{\input knuth}
  \stopcolumns
\stoptext

Thank you.


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

Re: [NTG-context] Missing Chapter Numbers

2017-10-22 Thread Thangalin
The following code does not hide the headings:

\setuphead[subsection][
  placehead=no,
  number=no,
]

% placehead=hidden breaks the counters?
\setuphead[subsubsection][
  placehead=no,
  number=no,
]

\starttext
  \chapter{chapter}
  chapter
  \section{section}
  section
  \section{subsection}
  subsection
  \section{subsubsection}
  subsubsection
\stoptext

The following code also does not hide the headings:

% placehead=hidden breaks the counters?
\setuphead[subsection, subsubsection][
  placehead=no,
  number=no,
]

\starttext
  \chapter{chapter}
  chapter
  \section{section}
  section
  \section{subsection}
  subsection
  \section{subsubsection}
  subsubsection
\stoptext

However, adding "section" makes the sub- and subsubsections hide as expected:

\setuphead[section, subsection, subsubsection][
  placehead=no,
  number=no,
]

\starttext
  \chapter{chapter}
  chapter
  \section{section}
  section
  \section{subsection}
  subsection
  \section{subsubsection}
  subsubsection
\stoptext

This behaviour appears to violate the principle of least astonishment.
___
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] Missing Chapter Numbers

2017-05-19 Thread Thangalin
\setuphead[chapter][number=yes,]
\setuphead[section][number=no,]
\setuphead[subsection][placehead=hidden,]

\definehead[scenesubsection][subsection]

\starttext
  \dorecurse{5}{
\chapter{Chapter Name}
\section{Section Name}
\startscenesubsection
\input tufte
\stopscenesubsection
  }
\stoptext

The chapter headings should be enumerated 1 through 5, but some
chapter numbers are either hidden or enumerated incorrectly. Using
"placehead=no" causes the spacing to change when framing an entire
section.

Related: 
https://github.com/contextgarden/context-mirror/blob/b14f992ef5f4e868c9959b174278c86516d60dbc/tex/context/base/mkiv/strc-sec.mkiv#L930

Any ideas on how to work around this issue?

Thank you!
___
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] Blank page introduced by setmathfont?

2017-01-27 Thread Thangalin
Example:

\usemodule[simplefonts]
\setmathfont[modern]

\starttext
  \startfrontmatter
\input knuth
  \stopfrontmatter
\stoptext

Expected Results

The text is on the first page.

Actual Results

The text is on the second page, the first page is blank.

Work Around

Remove \setmathfont[modern].

Version

mtx-context | current version: 2017.01.17 17:37

$ uname -a
Linux server 4.8.4-040804-generic #201610220733 SMP Sat Oct 22
11:35:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
___
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] WARNING: File path includes directory that doesn't exist

2016-07-30 Thread Thangalin
$ inkscape -V
Inkscape 0.92pre1 unknown (Jul 30 2016)

https://launchpad.net/~inkscape.dev/+archive/ubuntu/trunk

I'm not sure if this version of Inkscape is at fault. It'd be cool if
there was a way to specify the SVG to PDF converter program (e.g., to
use rsvg-converter instead) from the command line.
___
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] WARNING: File path includes directory that doesn't exist

2016-07-30 Thread Thangalin
Hi,

Possible problem converting SVG to PDF.

$ context --version

mtx-context | ConTeXt Process Management 0.63
mtx-context |
mtx-context | main context file:
/opt/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2016.07.18 16:46

cd $HOME/test
$ cat test.tex
\setupexternalfigures[
  order={svg,pdf,png},
  location={local,default,global},
  directory={images},
  frameoffset=.5em,
  maxwidth=\makeupwidth,
  width=\makeupwidth,
]

\starttext
\placefigure{}{\externalfigure[images/drawing.svg]}
\stoptext

$ cat images/drawing.svg

http://purl.org/dc/elements/1.1/;
   xmlns:cc="http://creativecommons.org/ns#;
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;
   xmlns:svg="http://www.w3.org/2000/svg;
   xmlns="http://www.w3.org/2000/svg;
   id="svg8"
   version="1.1"
   viewBox="0 0 210 297"
   height="297mm"
   width="210mm">
  
  

  
image/svg+xml
http://purl.org/dc/dcmitype/StillImage; />

  

  
  

  


$ context test.tex
... logging ...
** (inkscape:19807): WARNING **: File path
"--export-pdf=/home/username/temp/images/m_k_i_v_drawing.svg.pdf"
includes directory that doesn't exist.
... more logging ...

Work Around

$ cd images
$ inkscape -z drawing.svg
--export-pdf=/home/username/temp/images/m_k_i_v_drawing.svg.pdf
$ cd ..
$ context test.tex

No errors.

Any ideas how to fix, without manually converting each file first?
___
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] Fill up "bottom" space of page with some content

2015-12-03 Thread Thangalin
Hi Joseph,

Mind posting a minimum working example to illustrate what you're
trying to accomplish?
___
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] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-03 Thread Thangalin
The problem persisted with Courier New, not only Source Sans Pro (SSP).

The font file for Source Sans Pro came directly from the Google's font service.

The SSP (on my machine) works fine in Inkscape.

The exact same font was also working before the ConTeXt upgrade.
___
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] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-02 Thread Thangalin
The answer from a SE question has provided a little light:

http://tex.stackexchange.com/q/274582/2148

Directories listed in OSFONTDIR are not recursively scanned for font
files. That's a bit inconvenient. I borrowed from the answer in that
question to do the following:

rm -rf $HOME/.fonts
mkdir $HOME/.fonts
cd $HOME/.fonts
for i in $(echo $OSFONTDIR | sed -e 's/:/ /g') ; do for j in $(find $i
-type f); do ln -s $j .; done; done

The last line creates a symbolic link to every font file specified by
OSFONTDIR. This is means that adding new fonts requires re-linking
them to $HOME/.fonts.

After that, I set OSFONTDIR as follows in $HOME/.bashrc:

OSFONTDIR=$HOME/.fonts

Then:

mtxrun --script fonts --reload

After that, ConTeXT produced the PDF for the MWE at the start of this thread.

How can OSFONTDIR be recursed again?

FWIW, I tried:

OSFONTDIR=/usr/share/fonts//:/usr/local/share/fonts//:/usr/share/texmf/fonts/opentype//:/usr/share/fonts/type1/gsfonts//

That didn't work, either.
___
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] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-02 Thread Thangalin
Hi.

Installation: 
http://wiki.contextgarden.net/Ubuntu#With_ConTeXt_Standalone_.E2.80.93_should_work_with_all_Ubuntu_versions

Font (OTF): https://www.google.com/fonts/specimen/Source+Sans+Pro

= MWE (test.tex) =
\definefont[VersionFont][name:sourcesanspro]

\starttext
  \VersionFont
  Hello, World
\stoptext
= EOF =

= LOG FILE (test.log) =
system  > callbacks > not registering frozen 'find_format_file'

open source > 1 > 1 >
/usr/local/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2015.11.19 19:13 MKIV beta  fmt: 2015.12.2  int: english/english

system  > 'cont-new.mkiv' loaded
open source > 2 > 2 >
/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv
close source> 2 > 2 >
/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > /tmp/test.tex
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
fonts   > defining > source file 'SourceSansPro-Regular.ttf'
is not found
backend > xmp > using file
'/usr/local/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1
close source> 2 > 3 > /tmp/test.tex
close source> 1 > 3 >
/usr/local/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

!LuaTeX error: cannot find OpenType font file for reading ()
 ==> Fatal error occurred, no output PDF file produced!
= EOF =

= MTXRUN =
$ mtxrun --script fonts --list -all sourcesanspro

sourcesanspro   sourcesansprosemiboldit
/usr/local/share/fonts/google/s/SourceSansPro-SemiboldItalic.ttf
= EOT =

I also noticed that there's a luatex-cache directory in $HOME, which
is strongly undesirable. (It should be $HOME/.luatex-cache, or reside
under /var/.)

Any ideas on why the font cannot be found? This was working until I
upgraded ConTeXt last night.

Thank you.
___
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] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-02 Thread Thangalin
$ locate -i sourcesanspro
/home/.../luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tma
/home/.../luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tmc
/usr/local/share/fonts/google/s/SourceSansPro-Black.ttf
/usr/local/share/fonts/google/s/SourceSansPro-BlackItalic.ttf
/usr/local/share/fonts/google/s/SourceSansPro-Bold.ttf
/usr/local/share/fonts/google/s/SourceSansPro-BoldItalic.ttf
/usr/local/share/fonts/google/s/SourceSansPro-ExtraLight.ttf
/usr/local/share/fonts/google/s/SourceSansPro-ExtraLightItalic.ttf
/usr/local/share/fonts/google/s/SourceSansPro-Italic.ttf
/usr/local/share/fonts/google/s/SourceSansPro-Light.ttf
/usr/local/share/fonts/google/s/SourceSansPro-LightItalic.ttf
/usr/local/share/fonts/google/s/SourceSansPro-Regular.ttf
/usr/local/share/fonts/google/s/SourceSansPro-Semibold.ttf
/usr/local/share/fonts/google/s/SourceSansPro-SemiboldItalic.ttf

$ echo $OSFONTDIR
/home/.../.fonts:/usr/share/fonts:/usr/local/share/fonts:/usr/share/texmf/fonts/opentype:/usr/share/fonts/type1/gsfonts

The font is there, it's in the OSFONTDIR path.

Why isn't it found?

I've tried

   mtxrun --script fonts --reload

   luatools --generate

   context --reload

   context --generate

Further:

$ mtxrun --script fonts --list --all --pattern=sourcesans

sourcesanspro   sourcesansproregular
/usr/local/share/fonts/google/s/SourceSansPro-Regular.ttf
sourcesansproblack  sourcesansproblack
/usr/local/share/fonts/google/s/SourceSansPro-Black.ttf
sourcesansproblackitsourcesansproblackit
/usr/local/share/fonts/google/s/SourceSansPro-BlackItalic.ttf
sourcesansproblackitalicsourcesansproblackit
/usr/local/share/fonts/google/s/SourceSansPro-BlackItalic.ttf
sourcesansprobold   sourcesansprobold
/usr/local/share/fonts/google/s/SourceSansPro-Bold.ttf
sourcesansproboldit sourcesansproboldit
/usr/local/share/fonts/google/s/SourceSansPro-BoldItalic.ttf
sourcesansprobolditalic sourcesansproboldit
/usr/local/share/fonts/google/s/SourceSansPro-BoldItalic.ttf
sourcesansproextralight sourcesansproextralight
/usr/local/share/fonts/google/s/SourceSansPro-ExtraLight.ttf
sourcesansproextralightit   sourcesansproextralightit
/usr/local/share/fonts/google/s/SourceSansPro-ExtraLightItalic.ttf
sourcesansproextralightitalic   sourcesansproextralightit
/usr/local/share/fonts/google/s/SourceSansPro-ExtraLightItalic.ttf
sourcesansproit sourcesansproit
/usr/local/share/fonts/google/s/SourceSansPro-Italic.ttf
sourcesansproitalic sourcesansproit
/usr/local/share/fonts/google/s/SourceSansPro-Italic.ttf
sourcesansprolight  sourcesansprolight
/usr/local/share/fonts/google/s/SourceSansPro-Light.ttf
sourcesansprolightitsourcesansprolightit
/usr/local/share/fonts/google/s/SourceSansPro-LightItalic.ttf
sourcesansprolightitalicsourcesansprolightit
/usr/local/share/fonts/google/s/SourceSansPro-LightItalic.ttf
sourcesanspronormal sourcesansproregular
/usr/local/share/fonts/google/s/SourceSansPro-Regular.ttf
sourcesansproregularsourcesansproregular
/usr/local/share/fonts/google/s/SourceSansPro-Regular.ttf
sourcesansprosemibold   sourcesansprosemibold
/usr/local/share/fonts/google/s/SourceSansPro-Semibold.ttf
sourcesansprosemiboldit sourcesansprosemiboldit
/usr/local/share/fonts/google/s/SourceSansPro-SemiboldItalic.ttf
sourcesansprosemibolditalic sourcesansprosemiboldit
/usr/local/share/fonts/google/s/SourceSansPro-SemiboldItalic.ttf

Still not found.
___
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] setupthinrules

2015-04-16 Thread Thangalin
Thank you.

Here is an example that changes the \thinrule to something fancier:

\usemodule[fancybreak]

\setupfancybreak[symbol=star]
\define\thinrule\fancybreak
___
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] setupthinrules

2015-04-16 Thread Thangalin
Wikified.

http://wiki.contextgarden.net/Command/setupfancybreak
http://wiki.contextgarden.net/Modules/fancybreak

Might need some corrections and additions.
___
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] setupthinrules

2015-04-15 Thread Thangalin
Hi,

From http://wiki.contextgarden.net/Command/setupthinrules :

\define\BeforeCommand{Before}
\define\AfterCommand{After}
\define\BetweenCommand{Between}

\setupthinrules[
  before=\BeforeCommand,
  after=\AfterCommand,
  inbetween=\BetweenCommand,
  color=gray,
  height=1em,
]

\starttext
  \input knuth

  \thinrule

  \input knuth
\stoptext

This does not produce the expected output; it appears as though the
before/after/inbetween commands, as documented on the wiki, have no
behaviour.

Pandoc uses thinrule (probably because it spans the page by default)
when generating ConTeXt documents.

Using only thinrule, how would you go about making a totally sweet
(ornamental) horizontal rule, such as those shown at:
http://tex.stackexchange.com/a/76555/2148

Thank you!
___
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 Messages

2014-10-27 Thread Thangalin
What do you think about a wiki structure that directly corresponds to errors?

http://wiki.contextgarden.net/Errors/tex/1
http://wiki.contextgarden.net/Errors/context/1
http://wiki.contextgarden.net/Errors/metapost/1

When ConTeXt encounters a TeX error, the software writes the error
number to standard error:

tex error [1]  error on line 34 in file ...: ! Math error: parameter
\Umathquad\displaystyle is not set

Eventually this could generate a hyperlink for the corresponding wiki page:

tex error [1]  error on line 34 in file ...: ! Math error: parameter
\Umathquad\displaystyle is not set
tex error [1]  Details at: http://wiki.contextgarden.net/Errors/tex/1

Another idea is to create the error pages using markdown. The markdown
would serve the following purposes:

- Include source code snippets that can be compiled with ConTeXt as
another suite of tests
- Could be generated into Wiki pages, or local HTML pages,
automatically (e.g., I could set up a local web server and not have to
rely on the availability of the wiki).

The disadvantage is that it becomes slightly more difficult to edit
the documents, but there's nothing that states the editing process
needs to be one-way (markdown to wiki). There could be a way to go
from wiki to updating the markdown source of truth.

Thoughts?
___
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] Error Messages

2014-10-26 Thread Thangalin
Hi,

After upgrading to version 2014.10.07, I recompiled a document that
had gathered some dust and was greeted with:

tex error  error on line 34 in file ...: ! Math error: parameter
\Umathquad\displaystyle is not set

The document compiled using a previous version, and no changes were
made prior to upgrading. Having the line number and filename is a good
start. The error message, however, is confounding.

From this error message I have no idea:

- What triggered the error.
- Why \Umathquad\displaystyle is relevant.
- How to resolve the problem.

From superficial appearances, line 34 is fine (itemized list).

In addition to the error message, would it be possible to provide a
link to the wiki that offers more information? The information on the
wiki page would include:

- a unique identifier for the error number (e.g., err-tex-1)
- the error string (Math error: parameter ... is not set)
- a simple document that shows how to reproduce the problem
- a document that shows one way to fix the issue
- if relevant, note the ConTeXt version(s) that the simple document
compiles without error
- a brief description of why the error happens (i.e., explain why the
error shows up in the subsequent ConTeXt versions)

Thank you.
___
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 with alternative (interactive) TOC

2014-10-10 Thread Thangalin
Thank you, Wolfgang.

This fixes the issue. I worry, though, that these types of solutions
are a bit brittle. If the interactive alternative definition changes,
then the TOC code could break.

If the definition in strc-lst.mkvi were to change to something like:

% Perform a half-line adjustment in some cases
\listparameter\c!indent\hbox \strc_lists_get_reference_attribute\v!all
\strc_lists_get_destination_attribute {

Then the usage would look like:

\setuplist[section,][
  alternative=interactive,
  indent=\noindent,
  before=\endgraf,
]

That would leave a clue for maintenance purposes, making the overall
code less brittle.

Thoughts?
___
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] Error with alternative (interactive) TOC

2014-10-09 Thread Thangalin
Hi,

How do you make a custom TOC entry that links to the correct page?

In the following example, the last TOC item is not hyperlinked, and
all the section hyperlinks are incorrect (off by one). Note that the
chapters and sections are separate pages.

\setupinteraction[state=start,]
\setuphead[chapter,section][page=yes,continue=no,]

\define[3]\SectionTOC{#3 #2}

% Using alternative causes the cross-reference to be off-by-one.
\setuplist[section][
  alternative=interactive,
  command=\SectionTOC,
]

\starttext
  \placecontent

  \startchapter[title=Chapter]
\dorecurse{4}{
  \startsection[title=Section]
Level \recurselevel.
  \stopsection
}
  \stopchapter
\stoptext
___
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] Possibly bug: misalignment with matrix

2014-10-09 Thread Thangalin
Hi Xan,

It's not exactly what you want, but maybe it'll give you some other ideas:

\definemathmatrix[pmatrix][
  left={\left(\,},
  right={\,\right)},
]

\definenumber[pmatrix]
\resetnumber[pmatrix]

\define\nextmatrix{
  \incrementnumber[pmatrix]
  \getnumber[pmatrix].
}

\define[2]\pmatrices{
  \blank[big]
  \framed[frame=off]{
\startmixedcolumns[n=#1]
  #2
\stopmixedcolumns
  }
}

\starttext
Digueu quines de les matrius següents són regulars. Quan ho siguin,
trobeu la inversa

\pmatrices{4}{
  \nextmatrix
  \startpmatrix
\NC 2 \NC 3 \NR
\NC 6 \NC 7 \NR
  \stoppmatrix
  \column

  \nextmatrix
  \startpmatrix
\NC 3 \NC 2 \NC 1 \NR
\NC 4 \NC 5 \NC 3 \NR
\NC 5 \NC 0 \NC -2 \NR
  \stoppmatrix
  \column

  \nextmatrix
  \startpmatrix
\NC 5 \NC 4 \NC 2 \NR
\NC 2 \NC 2 \NC 3 \NR
\NC 7 \NC 6 \NC 5 \NR
  \stoppmatrix
  \column

  \nextmatrix
  \startpmatrix
\NC a \NC 0 \NC 0 \NC 0 \NR
\NC 0 \NC b \NC 0 \NC 0 \NR
\NC 0 \NC 0 \NC c \NC 0 \NR
\NC 0 \NC 0 \NC 0 \NC d \NR
  \stoppmatrix
}
\stoptext
___
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] LuaTeX Crashes

2014-10-09 Thread Thangalin
Hi,

This Heisenbug was arduous to nail down. The following code causes the
stack overflow on the first run:

http://pastebin.com/raw.php?i=qwGGBrJf

If the file is changed to compile successfully, then the compile will
succeed on subsequent attempts, even if the changes are reverted to
the original state. It only breaks on the first try. Something must be
cached, but I don't know what.

$ context --version
mtx-context | current version: 2014.10.07 11:14

$ luatex --version
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972)

$ uname -a
Linux 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux

There might be some extraneous bits, but hopefully that will be enough
of a clue as to the problem.
___
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] LuaTeX Crashes

2014-10-08 Thread Thangalin
Hi,

It seems tostring is calling itself indefinitely, causing it to crash:

C stack overflow
stack traceback:
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:388:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:371
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:347:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:332
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:347:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:332
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:347:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:332
[C]: in function 'tostring'
...
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:347:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:332
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:347:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:332
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:347:
in function ...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:332
[C]: in function 'tostring'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ini.lua:711:
in function 'pdfshareobjectreference'
...14.10.07/tex/texmf-context/tex/context/base/lpdf-ano.lua:574:
in function 'prerollreference'
...14.10.07/tex/texmf-context/tex/context/base/node-ref.lua:409:
in function 'setreference'
...14.10.07/tex/texmf-context/tex/context/base/node-ref.lua:597:
in function 'injectcurrentreference'
[\directlua]:1: in main chunk
___
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] Possibly bug: misalignment with matrix

2014-10-07 Thread Thangalin
Looks like a bug; adding blank rows works around the problem (but
looks terrible):

\definemathmatrix[pmatrix] [left={\left(\,},right={\,\right)}]

\starttext
Digueu quines de les matrius següents són regulars. Quan ho siguin,
trobeu la inversa

\startitemize[a,columns,four]
\item \startpmatrix[n=4]
\NC \NR
\NC 2 \NC 3 \NR
\NC 6 \NC 7 \NR
\NC \NR
\stoppmatrix

\item \startpmatrix[n=4]
\NC 3 \NC 2 \NC 1 \NR
\NC 4 \NC 5 \NC 3 \NR
\NC 5 \NC 0 \NC -2 \NR
\NC
\stoppmatrix

\item \startpmatrix[n=4]
\NC 5 \NC 4 \NC 2 \NR
\NC 2 \NC 2 \NC 3 \NR
\NC 7 \NC 6 \NC 5 \NR
\NC
\stoppmatrix

\item \startpmatrix[n=4]
\NC a \NC 0 \NC 0 \NC 0 \NR
\NC 0 \NC b \NC 0 \NC 0 \NR
\NC 0 \NC 0 \NC c \NC 0 \NR
\NC 0 \NC 0 \NC 0 \NC d \NR
\stoppmatrix

\stopitemize

\stoptext
___
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] (MKIV beta) APA citations: et al. incorrectly written

2014-10-05 Thread Thangalin
Hi,

One more note about et al.: the period can get duplicated. For example:

Mohammad Allahbakhsh, Aleksandar Ignjatovic, Boualem Bena-
tallah, Seyed-Mehdi-Reza Beheshti and Norman Foo et al.. An
analytic approach to people evaluation in crowdsourcing systems.

@article{allahbakhsh@crowdsourcing,
  author={Mohammad Allahbakhsh and Aleksandar Ignjatovic and Boualem
Benatallah and Seyed{-}Mehdi{-}Reza Beheshti and Norman Foo and Elisa
Bertino},
  title={An Analytic Approach to People Evaluation in Crowdsourcing Systems},
  journal={CoRR},
  year={2012},
  volume={abs/1211.3200},
  timestamp={Tue, 16 Sep 2014 19:27:03 +0200},
  biburl={http://dblp.uni-trier.de/rec/bib/journals/corr/abs-1211-3200},
  bibsource={dblp computer science bibliography, http://dblp.org},
  url={http://arxiv.org/abs/1211.3200},
}

There should only be one period. I think this was mentioned a while
back and might be related to removing the period in cases where
punctuation (such as a question mark) already exists.
___
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] spacing with enumeration...

2014-10-05 Thread Thangalin
Try this:

\defineenumeration[OtherMeaning][
  text=,
  headstyle=normal,
  alternative={left}, %,serried
  distance=0pt,
  width=20pt,
  stopper=\high{o},
  inbetween=,
  before={\blank[small]},
  after={\blank[small]},
  inbetween=,
]

\setupnarrower[
  before={\blank[big]},
  after={\blank[big]},
]

\starttext
{\bf Ton}

\startnarrower
  \startOtherMeaning
Inhoudsmaat van een schip, die 1000 kilo \dots
  \stopOtherMeaning
  \startOtherMeaning
Tonvormige boei \dots
  \stopOtherMeaning
\stopnarrower

{\bf Tong,} z. n. v.

\startnarrower
  Split van een standaard. \dots
\stopnarrower
\stoptext

See also:
http://wiki.contextgarden.net/Command/defineenumeration
http://wiki.contextgarden.net/Command/setupdescriptions
___
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] whitespace in \setuplist[chapter]

2014-10-04 Thread Thangalin
Try:

\setuplist[chapter][
  before={\blank[4*big]}
]

\starttext
  \completecontent
  \dorecurse{50}{\chapter{My Chapter}}
\stoptext

See also:

http://wiki.contextgarden.net/Command/setuplist
http://tex.stackexchange.com/questions/89758/
___
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] Use url to hyperlink bibliography title

2014-10-03 Thread Thangalin
Hi Alan,

 (Of course you are using the bibliography/bibtex module here which is
 currently being re-implemented but is not quite production ready...)

I didn't know that. Am looking forward to using it, thank you.

 Most bibliography styles ask that the url (or doi) appear at the end of
 the list rendering. This could be made active when list interaction is
 enabled.

I'd've thought that parameter order shouldn't matter. That is, it
should be possible to insert the doi anywhere in the entry.
(Typically, name-value pairs are read into a dictionary prior to
interpreting, which has a number of benefits, including order
independence.)

 Normally, clicking on the list entry itself (not the url or doi) will
 like back to the (first) citation of this work in the text. You would

That is useful. Yet, if the same reference is cited multiple times,
then clicking the entry would return the reader to the first
reference, which is probably undesirable if they were at a different
point in the document. The ability to disable such a feature is
useful.

 like, rather, that the title links to the url. (Why just the title
 rather than the entire entry, by the way?) This is an issue that we
 need to make configurable somehow. I will take note.

For this particular document, internal hyperlinks (cross-references)
are blue and external hyperlinks are orange. Consider the following
image:

http://i.stack.imgur.com/CGtQ9.png

It'd be nice if just the number within the brackets (i.e., 1) could be
set as the hyperlink back to the first reference (e.g., as a blue
hyperlink). (Again, the behaviour for citing the same reference in
multiple locations needs to be addressed. If it was [1, 2, 3], then
each number could cross-reference the correct back-reference in the
document. But this is a digression and probably not a terribly useful
feature.)

Reasons for title links, and not the whole entry, include:

- Aesthetics. Having the entire bibliography in orange would look terrible.
- Identifiable. The user would know that the text is an external
hyperlink, rather than thinking the entire bibliography was mistakenly
coloured orange.
- Multiple links. It should be possible to link to: the publisher,
author home pages (or email addresses), and conference web sites. If
the entire entry was a single link, it'd not be possible to have
separate links for different items.

Stylistically, for example, it should be possible to set Guido
Schryen to an orange hyperlink and have a small, hyperlinked envelope
beside his name that links to his email address (for digital copies;
hard copies would not include the envelope, but might write the email
address in parenthesis or, optionally, not display anything at all).

Here are a few scenarios:

@article{schryen@security,
  author = {Schryen, Guido},
  title = {Software security},
  doi = {http://...}, % adds a hyperlink to the title
  author_schryen = {http://...}, % hyperlinks to author's home page
}

@article{schryen@security,
  author = {Schryen, Guido},
  title = {Software security},
  doi = {http://...}, % adds a hyperlink to the title
  author_schryen = {http://...}, % hyperlinks name to author's home page
  author_schryen = {mailto:gschr...@domain.com}, % envelope icon hyperlink
}

@article{schryen@security,
  author = {Schryen, Guido},
  title = {Software security},
  author_schryen = {mailto:gschr...@domain.com}, % hyperlinks name, no envelope
}

If the authors have two (or more) identical last names, they can be
matched in listed order of the author entry:

  author_schryen_1 = {http://...}
  author_schryen_2 = {mailto:gschr...@domain.com},

It can be time-consuming to contact the author of a paper. Providing
the ability to link back to the author (in some form) is a courteous,
expedient convenience.
___
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] Set: The Card Game

2014-09-25 Thread Thangalin
Hi,

Another ConTeXt example.

https://bitbucket.org/djarvis/salish-card-set/src/

Included is a script (svg2mp.sh) that converts SVG files into MetaPost
code. This allows for editing the image shapes in Inkscape (or
similar) then manipulating them in MetaPost.

This example code produces a thematic variation on Set. There are a
few unsightly hacks, and some duplicated code that could be
eliminated.

Improvements and general comments are welcome.
___
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] Use url to hyperlink bibliography title

2014-09-25 Thread Thangalin
Hi,

The question is also posted here:

http://tex.stackexchange.com/questions/201357/context-use-url-parameter-to-hyperlink-bibliography-title-references

My concern is that every bibtex entry type must be modified. Unless
I'm mistaken, every bibtex entry has a title, so (in theory) that
title macro should be defined and reused in a single location. It
should be a matter of finding that macro and changing its definition.

However, I've been unable to find the definition for the title macro
(there seem to be a number of macros named title or variants
thereof) and am loathe to duplicate all the bibtex entries.

Any ideas?
___
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] bug in hyphenation?

2014-09-16 Thread Thangalin
Hi Pablo,

Are you able to avoid \hsize in favour of something like start/stopnarrower?

\setuppapersize[A8]
\starttext
\startnarrower[-left]
\startlinenumbering
sentence
sentence
sentence
\stoplinenumbering
\stopnarrower

\startnarrower[-left]
sentence
sentence
sentence
\stopnarrower
\stoptext

Also, note that the first \hsize\zeropoint has no visible effect:

\setuppapersize[A8]
\starttext
\startlinenumbering
%\hsize\zeropoint
...
\stoptext
___
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] Use url to hyperlink bibliography title

2014-09-16 Thread Thangalin
Hi List,

How do you make a hyperlink for a bibtex entry's title using the entry's URL?

The bibtex entries include articles, techreports, inproceedings,
books, and so forth. I can work around the issue by duplicating the
URL as follows. For example, save this as sources.bib:

@inproceedings{schryen@security,
  author={Schryen, Guido and Rich, Eliot},
  title={\bibhref{Increasing software security through open source or
closed source development? Empirics suggest that we have asked the
wrong question}{http://epub.uni-regensburg.de/21293/}},
  booktitle={Proceedings of the 2010 43rd Hawaii International
Conference on System Sciences},
  series={HICSS '10},
  year={2010},
  isbn={978-0-7695-3869-3},
  pages={1--10},
  numpages={10},
  doi={10.1109/HICSS.2010.228},
  acmid={1748219},
  publisher={IEEE Computer Society},
  address={Washington, DC, USA},
  url={http://epub.uni-regensburg.de/21293/},
}

Here is a short example that uses the sources.bib file:

\setupbibtex[database=sources]
\setuppublications[
  alternative=num,
  sorttype=cite,
]

% Superscript citation cross-references.
\setupcite[num][
  left=\raisebox{1ex}\hbox\bgroup\tfxx,
  right=\egroup,
]

\definecolor[WPexternal][h=B93507]

\setupinteraction[
  state=start,
]

\def\WPHyperlink{%
  \setupinteraction[
style=normal,
color=WPexternal,
  ]%
}

\define[2]\bibhref{%
  \WPHyperlink
  {\goto{#1}[url(#2)]}%
}

\starttext
  \startbodymatter
\startchapter[title={Title},]
  \startsection[title={Transparency}]
The complete source code is open for analysis and
development.\cite[schryen@security]
  \stopsection
\stopchapter
  \stopbodymatter
  \startbackmatter
\completepublications[criterium=text]
  \stopbackmatter
\stoptext

The title is hyperlinked, but mixes presentation with content and
duplicates the URL. Note that the colour is also changed to match the
other external links in the document.

Thank you.
___
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] Līberum Cōnsilium: an example ConTeXt document

2014-08-17 Thread Thangalin
Hi,

Here technical document in ConTeXt. It goes a bit beyond the basics
but is not complex. The source code is available:

https://bitbucket.org/djarvis/world-politics/src/master/xml/tex/

The output:

https://bytebucket.org/djarvis/world-politics/raw/master/xml/tex/manual.pdf

Comments, critiques, and questions are welcome.

Thank you for your generous help.
___
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] Class diagram in Ctx?

2014-08-13 Thread Thangalin
Hi,

Another option is to use graphviz (dot) to create the graph as an SVG
file and then include that graphic. For example:

-- graph.dot --
digraph CL {
  Home - {Summary Account};
  Summary - {Proposal Resources Hypothesis Discuss};
  Discuss - {Support};
}

-- Run GraphViz --
dot -Tsvg graph.dot  graph.svg

-- Reference in ConTeXt --
\externalfigure[graph.svg]

Not as clean as embedded TikZ code, but the syntax is quite terse.

Dave

On Wed, Aug 13, 2014 at 3:19 AM, Procházka Lukáš Ing. - Pontex s. r.
o. l...@pontex.cz wrote:
 Hello,

 thanks both for the tips, I'm going to try.

 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
 ___
___
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] Citation Sort Order

2014-08-10 Thread Thangalin
Thank you, Rik.

I wanted to list all the bibliography entries (including unreferenced
citations) with referenced citations ordered chronologically. I
suppose that would require maintaining two separate bibliography
files...

It's not all that important, though.

Kindest regards.
___
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] Superscript Citation References

2014-08-07 Thread Thangalin
Hi,

I would like to cite bibliography references using a superscript font.
Here is the setup:

\setupbibtex[database=sources]
\setuppublications[
  refcommand=num,
  numbering=yes
]

\setupcite[num][
  left=\empty,
  right=\empty,
]

\starttext
  Citation.\cite[kattamuri@debate]
\stoptext

Here is an example entry in sources.bib:

@inproceedings{kattamuri@debate,
 author = {Kattamuri, Kishore and Silaghi, Marius and Kaner, Cem and
Stansifer, Ryan and Zanker, Markus},
 title = {Supporting Debates over Citizen Initiatives},
 booktitle = {Proceedings of the 2005 National Conference on Digital
Government Research},
 series = {dg.o '05},
 year = {2005},
 location = {Atlanta, Georgia},
 pages = {279--280},
 numpages = {2},
 url = 
{https://repository.lib.fit.edu/bitstream/handle/11141/150/cs-2005-03.pdf},
 acmid = {1065321},
 publisher = {Digital Government Society of North America},
}

I tried the following:

\setupcite[num][
  left=\empty,
  right=\empty,
  textstyle=\textsuperscript,
]

It did not work...

Any ideas?

Thank you!
___
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] Citation Sort Order

2014-08-07 Thread Thangalin
The documentation (http://www.ntg.nl/maps/26/12.pdf) suggests that the
order of citations can be changed using sorttype=cite.

The example code below writes a 6 in the document. I thought by
setting the sorttype to cite that the bibliography order would be
determined based on the order that the cite macros occur in the
document.

If I have understood correctly, then the sample document should write
a 1 in the document.

Any idea why 6 is written instead of 1?

Thank you.
--

Example code:

\setupbibtex[database=sources]
\setuppublications[
  sorttype=cite,
]

\starttext
  hello world\cite[kattamuri@debate]

  \startbackmatter
\completepublications[criterium=all]
  \stopbackmatter
\stoptext

--
Sample bibliography:

@inproceedings{delaune@coercion,
  title={Coercion-resistance and receipt-freeness in electronic voting},
  author={Delaune, Stephanie and Kremer, Steve and Ryan, Mark},
  booktitle={Computer Security Foundations Workshop. 19th IEEE},
  pages={12--pp},
  organization={IEEE},
  year={2006},
  url={https://www.cs.bham.ac.uk/~mdr/research/papers/pdf/06-csfw.pdf},
}

@article{zbmath0homomorphic,
  author={Andrea {Huszti}},
  title={{A homomorphic encryption-based secure electronic voting scheme}},
  journal={{Publicationes Mathematicae}},
  ISSN={0033-3883},
  volume={79},
  number={3-4},
  pages={479--496},
  year={2011},
  publisher={Institutum Mathematicum Universitatis Debreceniensis, Debrecen},
  language={English},
  DOI={10.5486/PMD.2011.5142},
  MSC2010={94A60 68P25},
  zbl={1249.94030},
  url={https://www.inf.unideb.hu/~ahuszti/papers/5142-Huszti_megjelent.pdf},
}

@inproceedings{peng04homomorphic,
  author={Kun Peng and Riza Aditya and Colin Boyd and Byoungcheon Lee},
  title={Multiplicative homomorphic e-voting},
  booktitle={In Advances in Cryptology - Indocrypt ’04},
  year={2004},
  pages={61--72},
  url={https://eprints.qut.edu.au/24434/1/},
}

@inproceedings{kremer@verify,
  address={Athens, Greece},
  author={Kremer, Steve and Ryan, Mark D. and Smyth, Ben},
  booktitle={{P}roceedings of the 15th {E}uropean {S}ymposium on
{R}esearch in {C}omputer {S}ecurity ({ESORICS}'10)},
  DOI={10.1007/978-3-642-15497-3_24},
  editor={Gritzalis, Dimitris and Preneel, Bart},
  pages={389-404},
  publisher={Springer},
  series={Lecture Notes in Computer Science},
  title={Election verifiability in electronic voting protocols},
  volume={6345},
  year={2010},
  month={9},
  acronym={{ESORICS}'10},
  url={https://www.lsv.ens-cachan.fr/Publis/PAPERS/PDF/KRS-esorics10.pdf},
}

@article{acquisti0homomorphic,
  author={Alessandro Acquisti},
  
url={https://www.heinz.cmu.edu/~acquisti/papers/acquisti-electronic_voting.pdf},
  journal={IACR Cryptology ePrint Archive},
  pages={105},
  title={Receipt-Free Homomorphic Elections and Write-in Voter
Verified Ballots},
  volume={2004},
  year={2004},
  month={4},
}

@inproceedings{kattamuri@debate,
 author = {Kattamuri, Kishore and Silaghi, Marius and Kaner, Cem and
Stansifer, Ryan and Zanker, Markus},
 title = {Supporting Debates over Citizen Initiatives},
 booktitle = {Proceedings of the 2005 National Conference on Digital
Government Research},
 series = {dg.o '05},
 year = {2005},
 location = {Atlanta, Georgia},
 pages = {279--280},
 numpages = {2},
 url = 
{https://repository.lib.fit.edu/bitstream/handle/11141/150/cs-2005-03.pdf},
 acmid = {1065321},
 publisher = {Digital Government Society of North America},
}
___
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] ConTeXt Garden Examples Maintenance

2014-05-16 Thread Thangalin
Hi,

The ConText Garden wiki has numerous short example sprinkled
throughout its pages. I presume that they are hard-coded in the page.
if the example breaks (due to a ConTeXt bug or backwards-incompatible
enhancement), I imagine there is no notification.

What do you think about creating a repository of examples that are
included by embedding a website address instead of direct text? For
example:

1. User visits wiki.
2. User edits a page (e.g., Command/setuphead).
3. User names and uploads a .tex document.
4. System generates unique hyperlink for .tex document.
5. System generates and includes embed code into wiki page, such as:

context href=http://wiki.contextgarden.net/context/examples/file.tex; /
context href=/context/examples/file.tex /

Also, source=yes and mode=mkiv should be the default. Then, if the
person editing the page wants to include the output, the full example
might resemble:

  context href=/context/examples/file.tex
  This produces:
  context output=yes href=/context/examples/file.tex

Having the complete examples separated allows the snippets to be
tested automatically. Broken .tex examples (unless explicitly flagged)
would result in notifications being sent to the page maintainer(s). A
broken example could be flagged as:

  context notify=no href=/context/examples/file.tex

Another advantage is that all the examples could be downloaded and
possibly referenced in other media.

Kindest regards.
___
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] Empty heads after leading whitespace

2014-05-05 Thread Thangalin
Avoid vskip.

http://wiki.contextgarden.net/Command/vskip
___
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] Empty heads after leading whitespace

2014-05-05 Thread Thangalin
\setuphead
  [section]
  [placehead=empty,
   page=yes,
   after={\blank[0em]\blank[disable]}]

That works for me. I don't know if it is better, but if it works for
you as well then it is probably the way to go.

mtx-context | current version: 2014.01.03 00:40
___
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] Empty heads after leading whitespace

2014-05-01 Thread Thangalin
\setuphead[section][%
placehead=empty,
before=,
after=]
\setuphead[subsection][%
placehead=yes,
before=\empty,
after={\blank[line]}]
\setupheadertexts[section]

\starttext
\showframe
\section{My section}
\subsection{My subsection (whitespace before)} % Here is my problem.
\page
\subsection{My subsection (NO whitespace before)}
\stoptext

Is that what you mean?
___
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] Synonyms and criterium

2014-04-28 Thread Thangalin
A couple of reasons for minimal examples: having an isolated issue is
easier to debug and in the process of simplifying the code you might
stumble on the solution yourself.

For example, I have a book that uses dozens of files. When I encounter
an issue, I concatenate the files and then start chopping out chunks
that don't affect the output. Eventually I get down to a minimal
example that allows me to further research the issue. If I get stuck,
then I post the problem.

It's time-consuming but you can't assume people will dedicate the time
to replicate issues based on descriptions... :-) Try to whittle down a
minimal example that illustrates the problem.
___
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] Open-Source Development Grant

2014-04-24 Thread Thangalin
https://stripe.com/blog/stripe-open-source-retreat

Grant of $7500 per month, plus food, for working on OSS projects.

If there's something that could use three months of F/T work that
would be massively helpful for ConTeXt, it might be worthwhile
submitting a proposal.
___
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] Unwanted whitespace for tables and enumerations after \inmargin headings

2014-04-19 Thread Thangalin
Hi,

insidesection={\blank[overlay]}]

This appears to require the latest beta.
___
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] Automated Regression Testing for Typeset Material

2014-04-19 Thread Thangalin
Hi,

An idea to test the final output:

# Create PDFs for all tests.
cd $REGRESSION
for i in *.tex; do
  context-beta $i
done

# Convert all PDF pages to images.
for i in *.pdf; do
  convert $i $(basename $i .pdf)%0d.png
done

# Note any differences between images.
for i in *.png; do
  if diff $i $ORIGINAL/$i /dev/null ; then
echo pass
  else
echo fail  $i.log
 fi
done
___
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] Unwanted whitespace for tables and enumerations after \inmargin headings

2014-04-18 Thread Thangalin
Hi Rik,

The example isn't quite as minimal as it could be... Here is a
simplified version demonstrating the problem:

\setuplayout[backspace=4cm]

\define[2]\MarginHead{\inmargin{#1 #2}}

\setuphead[section][
  alternative=text,
  command=\MarginHead,
]

\defineitemgroup[itemz]
\setupitemgroup[itemz][each][joinedup]

\startbuffer[Item]
  \startitemz
\item Item
\item Item
  \stopitemz
\stopbuffer

\starttext
  \section{No Whitespace}
  No extra whitespace before items.
  \getbuffer[Item]

  \section{Extra Whitespace}
  \getbuffer[Item]
  Unexpected extra whitespace before items.
\stoptext
___
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] Column Width

2014-04-16 Thread Thangalin
Hi,

According to the columns manual, the following should produce a
two-column layout with the first column being 1/3 and the second
column being 2/3 the makeupwidth:

\definecolumnset[example][n=2]
\setupcolumnset[example][1][width=.33\makeupwidth]
\starttext
  \startcolumnset[example]
\dorecurse{25}{\input knuth\column[local]}
  \stopcolumnset
\stoptext

Using: mtx-context | current version: 2014.01.03 00:40

What is the simplest example to achieve two different column widths
for a columnset?

(The Paragraphs example on the wiki --
http://wiki.contextgarden.net/Columns#Paragraphs -- works, but I need
the flexibility of column sets.)

Thank you!
___
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] Column Width

2014-04-16 Thread Thangalin
It seems a few examples from the columns manual --
http://www.pragma-ade.com/general/manuals/columns.pdf -- are broken.
Here is another (from page 34):

\definecolumnset[example][n=3]
\definecolumnset[therest][n=4]
\setupcolumnset[example]
\setupcolumnset[therest] [distance=.5cm] [distance=.5cm]
\setupcolumnset[example]
\setupcolumnset[therest]
   [width=\dimexpr((\makeupwidth-1.5cm)/4)]
  [width=\dimexpr((\makeupwidth-1.5cm)/4)]
\setupcolumnset[example][1]
  [width=\dimexpr(\makeupwidth-1.0cm-2\dimexpr((\makeupwidth-1.5cm)/4))]
\starttext
  \startcolumnset[example,therest]
\startcolumnmakeup
\vfill \input knuth
\stopcolumnmakeup
\column[local]
\dorecurse{25}{\input knuth\par}
  \stopcolumnset
\stoptext
___
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] Possible bug: definetextbackground and grid layout

2014-04-05 Thread Thangalin
http://wiki.contextgarden.net/TextBackground

The first example works.
___
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] Line numbering in columns broken

2014-04-05 Thread Thangalin
Confirmed to work in version 2014.01.03 00:40.
___
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] Bug: Overlapping Text

2014-04-01 Thread Thangalin
Hi,

The second page of the following document has overlapping text in the
second column (this has been as minimal as I can get):

\setuphead[section][before={\testcolumn[4]},]

\starttext
\startmixedcolumns[align=right, balance=yes, grid=strut,]
\dorecurse{5}{
  \startsection
\startitemize[inbetween={\blank[.25em]},]
  \item{Item}
  \item{Item item item item item item item item}
  \dorecurse{2}{\item{Item item item item item item item item item
item item item item item item item item item item item item item}}
  \item{item item item item item item item item item item item
item item item item}
  \dorecurse{3}{\item{Item item item item item item item item item
item item item item item item item item item item item item item}}
  \item{Item item item item item item item item item item item
item item item item item item item item item item}
\stopitemize
  \stopsection
}
\stopmixedcolumns
\stoptext

Changing the \testcolumn value from 4 to anything else has no effect.
Removing it altogether, however, does affect the outcome.
___
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] Bug? Missing items in nested columnar layout

2014-04-01 Thread Thangalin
Hi,

\setuphead[subsection][after={\blank[small]},]

\starttext
  \startcolumns
\startmixedcolumns[balance=yes,]
  \startsubsection[title=title,]
\startitemgroup[][packed][before=\empty]
  \dorecurse{10}{\startitem item \#\recurselevel{}.\stopitem}
\stopitemgroup
  \stopsubsection
\stopmixedcolumns
  \stopcolumns
\stoptext

Items 1 - 3 are missing -- they should be on the left column.

$ context --version
mtx-context | current version: 2014.01.03 00:40

Any suggestions for how to fix this?
___
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] TLS and externalfigure

2014-03-30 Thread Thangalin
http://wiki.contextgarden.net/Using_Graphics#HTTPS

Thank you, Hans.
___
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] Feature request: use rsvg-convert

2014-03-30 Thread Thangalin
Hi,

Re: http://wiki.contextgarden.net/Using_Graphics#Image_Conversion

I recommend using rsvg-convert instead of inkscape. For example:

wget http://en.wikipedia.org/wiki/File:Inkscape_0.48.2_with_Red_Gallardo.svg
-O car.svg
time rsvg-convert --format pdf car.svg --output car-rsvg.pdf
time inkscape --file=car.svg --export-pdf=car-inkscape.pdf --without-gui

wget 
http://openclipart.org/download/people/TheStructorr/TheStructorr_Lamborghini_Gallardo.svg
-O car2.svg
time rsvg-convert --format pdf car2.svg --output car2-rsvg.pdf
time inkscape --file=car2.svg --export-pdf=car2-inkscape.pdf --without-gui

Here, inkscape is slightly faster yet produces slightly larger files.

inkscape 0.48.4 r9939 (Jan 22 2014)
rsvg-convert version 2.40.2

More importantly, inkscape renders incorrectly. The horizontal and
vertical rule marks are missing in the first image. The gradient
shadows are missing in the second image, and the grill is incorrect
(looks like a layer order issue).
___
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] TLS and externalfigure

2014-03-30 Thread Thangalin
Hi,

Adding --insecure works. I think the option should be present by
default, which could save people time trying to understand what part
of the system is preventing the images from being downloaded. (For
example, for me I first checked caching, directory permissions, web
server configuration, and the wiki before posting to the list.)
___
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] TLS and externalfigure

2014-03-29 Thread Thangalin
Hi,

I have images hosted on a local web server using a self-signed
certificate. For example:

https://localhost/images/.../file.png

When using ConTeXt, the image cannot be retrieved; a verified signed
certificate works as expected.

Using wget, self-signed certificates can be forced:

wget --no-check-certificate https://localhost/images/.../file.png

Does ConTeXt have a way to ignore/bypass certificate validation? If so, how?

(Note: the certificate's common name is currently blank, which does
not match 'localhost' -- I can fix that if required...)

Thank you!
___
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] Bugs in XML export (for ePub)

2014-03-11 Thread Thangalin
Hi Hraban,

I tried to create ePubs using ConTeXt late last year (it was a driving
factor for me to switch from LaTeX).

In practice, ConTeXt cannot actually produce ePub content of any
sufficient complexity that an ePub reader (such as Kindle) can read. I
abandoned that development line a while ago. That said, ConTeXt is
orders of magnitude easier to work with than LaTeX (for me) and has an
architecture that holds a promising future.

Since my project exports XML, I began an ePub solution using XSLT and
DocBook. The ant4docbook Java application can produce ePub files from
DocBook using an ant task, making the API simple to use. The resulting
ePub archive can be read by various e-readers.

http://ant4docbook.sourceforge.net/

Unless anyone says otherwise (or there have been momentous
improvements in this area), I would recommend that you do not use
ConTeXt to create ePub files. While technically it can produce an ePub
archive, you will waste countless hours hitting wall after wall.
___
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] Bugs in XML export (for ePub)

2014-03-11 Thread Thangalin
Hi, Hraban.

Here is the thread from last year for your reference:

https://www.mail-archive.com/ntg-context@ntg.nl/msg71376.html
___
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] struggling with section headers

2014-03-10 Thread Thangalin
Hi,

Try using \testpage[3]. The 3 will have to vary depending on the
number of lines that the section titles can possibly take up. For
example, if the section title takes up 4 lines, then you might want to
use \testpage[5].

\usemodule[visual] % fakewords

\definepapersize[a6][width=105mm,height=148mm] % ConTeXt seems to have
forgotten about a5 and a6??
\setuppapersize[a6][a6] % small paper to get more breaks

\setupbodyfont[rm,9pt]
\setupinterlinespace[12pt]

\setupindenting[yes, medium, next]
\setupblank[big]
\setupcolor[state=start]

\setuplayout[grid=yes]

\setupheads[
  align={right,nothyphenated},
  tolerance=verytolerant,
  grid=line
]
\definefont[SectionFont][Sans at 11pt] % fits within grid
\setuphead[section][
  page=no, style={\SectionFont},
  before={\blank\testpage[3]}, after={},
  interlinespace=12pt
]

% dummy section with long, red title
\def\Section{
\startsection[title={\definecolor[fakerulecolor][red]Section
Title\fakewords{2}{15}\definecolor[fakerulecolor][black]}]
\fakewords{20}{50}\par\fakewords{20}{50}\par\fakewords{20}{50}\par
\stopsection
}

\starttext

\startchapter[title={See, ye mighty, and despair!}]

\fakewords{10}{30}

\dorecurse{20}{\Section}

\stopchapter

\stoptext
___
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] Customize register format

2014-03-09 Thread Thangalin
Hi,

I am trying to reproduce the following register layout:

http://i.imgur.com/qXSK2VM.png

Entries include a section name, page number, author, and author URL;
the entries are formatted fairly differently from a standard index. So
far I have:

\setupinteraction[state=start,]
\define\Punctuate{\color[black]{\normal.}}
\define[2]\href{\begingroup\goto{\color[blue]{#1}}[url(#2)]\endgroup}
\define[1]\TextCommand{\item\currentregisterpageuserdata{title}, }
\define[1]\PageCommand{#1\Punctuate{}
{\href{\currentregisterpageuserdata{author}}{\currentregisterpageuserdata{authorurl}}}\Punctuate\stopitemize}

% #1 - Author; #2 - Author URL; #3 - Section title
\define[3]\PhotographerIndexEntry{%
  \setregisterentry[PhotographerIndex][entries={#1}][
title={#3},
author={#1},
authorurl={#2},
  ]{}
}

\defineregister[PhotographerIndex][
  n=1,
  indicator=no,
  textcommand=\TextCommand,
  pagecommand=\PageCommand,
  distance=\zeropoint,
  before={\startitemize[packed,nowhite]},
]

\setuphead[section][aftersection=\page,]

\starttext
  \startsection[title={Maguro}]
Text
\PhotographerIndexEntry{Kenji Fujimoto}{http://bit.ly/1fNWF0Y}{Maguro}
  \stopsection
  \startsection[title={Unagi}]
Text
\PhotographerIndexEntry{Kenji Fujimoto}{http://bit.ly/1fNWF0Y}{Unagi}
  \stopsection
  \placePhotographerIndex
\stoptext

This fails because values for entries={#1} must be unique.

How can I customize the registers to resemble the given layout?

(Aside, the section title is repeated twice -- is there a way to
remove the duplication? I tried \namedstructurevariable, but couldn't
figure out how to get the expanded value.)

Thank you.
___
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] What’s wrong with \nomarking{\crlf}?

2014-03-06 Thread Thangalin
Hi,

From the docs:

http://wiki.contextgarden.net/MkIV_Differences#Nomarking.2FSelect

\nomarking is currently broken and will likely be removed from mkiv;
use \select instead...
___
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] Bug: Columnar itemized text

2014-03-06 Thread Thangalin
Hi,

I believe I have isolated the problem:

\starttext
  balance
  \startmixedcolumns[balance=yes,]
\dorecurse{8}{\input{ward}}
  \stopmixedcolumns
  %\page

  strut
  \startmixedcolumns[grid=strut,]
\dorecurse{4}{\input{knuth}}
  \stopmixedcolumns
\stoptext

When balanced mixedcolumns are followed by mixedcolumns using a strut
grid, then the content of the second mixedcolumns will extend into the
footer area on the next page. However, if the content of the strut
grid mixedcolumns is long enough to incur a page break on that next
page, then no content spills into the footer.

How can I help fix this?
___
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] Bug: Columnar itemized text

2014-03-06 Thread Thangalin
Fixed.

Thank you!
___
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] Presentation template

2014-03-03 Thread Thangalin
Hi Fabrice,

I'm not sure what you mean by your classes -- do you mean
presentation material to help students?

Here are some links to get you started:

http://tex.stackexchange.com/questions/52841/where-to-find-the-source-code-to-the-context-manuals
https://foundry.supelec.fr/projects/contextman/
http://context.aanhet.net/svn/

If you are just starting out with ConTeXt, take a look at the following:

http://wiki.contextgarden.net/Manuals#First_manuals
http://wiki.contextgarden.net/ConTeXt,_an_excursion
___
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] \starthanging and hangafter

2014-03-02 Thread Thangalin
Hi Alan,

From the archives:

http://www.ntg.nl/pipermail/ntg-context/2006/015481.html

The \hangsidefloat and \movesidefloat commands may prove useful.

Once you have a simple working example, post it to this thread and
I'll update the wiki.
___
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] \starthanging and hangafter

2014-02-28 Thread Thangalin
Hi Alan,

Please post your code.

On Fri, Feb 28, 2014 at 6:54 AM, Alan Bowen bowenala...@gmail.com wrote:
 I am using using \starthanging…\stophanging to embed a small image in a
 paragraph in a footnote. Currently, I have a pattern like:

 xx

 xx

 xx

 xx

 

 

 

 

 

 


 Is there a way to get a pattern like


 

 

 xx

 xx

 xx

 xx

 

 

 

 


 instead?


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

  1   2   >