[NTG-context] How to center a \placefloat?

2014-02-18 Thread Marcin Borkowski
Hi list,

I'd like to have a figure (by means of \placefigure) centered
horizontally.  Currently, I'm doing

  \placefigure[bottom,none,middle]{}{%
\hbox to\textwidth{\hfil\externalfigure[logo-2-t][height=1.5cm]\hfil}}

Is there a better way?  If yes, how to do this?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] How to center a \placefloat?

2014-02-18 Thread Wolfgang Schuster

Am 18.02.2014 um 11:24 schrieb Marcin Borkowski mb...@wmi.amu.edu.pl:

 Hi list,
 
 I'd like to have a figure (by means of \placefigure) centered
 horizontally.  Currently, I'm doing
 
  \placefigure[bottom,none,middle]{}{%
\hbox to\textwidth{\hfil\externalfigure[logo-2-t][height=1.5cm]\hfil}}
 
 Is there a better way?  If yes, how to do this?

\setupexternalfigures[location=default]

\starttext

\input knuth

\placefigure
  {A dutch cow}
  {\externalfigure[cow][width=8cm]}

\input ward

\stoptext

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

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


[NTG-context] bug/issue with components and preamble (Re: Euler with fallback)

2014-02-18 Thread Sanjoy Mahajan
Sanjoy Mahajan san...@olin.edu writes:

 The wiki page for Project Structure has always shown setups (via
 \project ... ) going after the \startcomponent or \startproduct.  I've
 edited the examples to have setups before the
 \start(product|component).  If I did it wrong, let me know.

My change doesn't work, because of how components handle project files
(which also turns out to explain why I was seeing the Euler font when
you didn't).  The problem is that context doesn't generate a pdf file if
the \project line comes before the \startcomponent.  Thus, I was seeing
a pdf file from a previous version of the test file (where the font
setup came after the \startcomponent).

Here are the two test files (testproject2.tex and test6.tex):

 testproject2.tex 
\startproject testproject
\stopproject
==

(If testproject2.tex is empty, then the problem does not occur.)

== test6.tex =
\project testproject2
\startcomponent test

\input knuth

\placeformula\startformula
a^2 + b^2 = c^2
\stopformula

\stopcomponent
==

Here is the log file.  It says 'result saved in test6.pdf' but no pdf
file is actually saved.

(/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2014.02.14 17:07 MKIV beta  fmt: 2014.2.15  int: english/english

system   'cont-new.mkiv' loaded
(/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
system   files  jobname 'test6', input './test6', result 'test6'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
(/home/sanjoy/sfse/test6.tex 
(testproject2.tex{/home/sanjoy/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
{/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts'fallback modern rm 12pt' is loaded
 ) ) )

system   structure  start used structure

used structure   text: test6
used structure project: testproject

system   structure  stop used structure


system   files  start used files

used file   1: filename=cont-yes.mkiv filetype=tex 
foundname=/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-yes.mkiv 
usedmethod=otherwise
used file   2: filename=cont-new.mkiv filetype=tex 
foundname=/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-new.mkiv 
usedmethod=otherwise
used file   3: filename=lang-us.lua filetype=scripts 
foundname=/home/sanjoy/context/tex/texmf-context/tex/context/patterns/lang-us.lua
 usedmethod=otherwise
used file   4: filename=/home/sanjoy/sfse/test6.tex 
foundname=/home/sanjoy/sfse/test6.tex usedmethod=direct
used file   5: filename=testproject2.tex foundname=testproject2.tex 
usedmethod=direct
used file   6: filename=mkiv-base.map filetype=map format=map 
foundname=/home/sanjoy/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map
 usedmethod=database
used file   7: filename=lm.lfg filetype=tex 
foundname=/home/sanjoy/context/tex/texmf-context/tex/context/fonts/lm.lfg 
usedmethod=otherwise
used file   8: filename=lm-math.lfg filetype=tex 
foundname=/home/sanjoy/context/tex/texmf-context/tex/context/fonts/lm-math.lfg 
usedmethod=otherwise
used file   9: filename=lm-math.map filetype=map format=map 
foundname=/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-math.map 
usedmethod=database
used file  10: filename=lm-rm.map filetype=map format=map 
foundname=/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map 
usedmethod=database
used file  11: filename=lmroman12-regular filetype=otf format=otf 
foundname=/home/sanjoy/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 usedmethod=database
used file  12: filename=latinmodern-math.otf filetype=opentypefonts 
foundname=/home/sanjoy/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 usedmethod=database
used file  13: filename=latinmodern-math.otf filetype=otf format=otf 
foundname=/home/sanjoy/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 usedmethod=database

system   files  stop used files


system   options  start commandline options

used option  currentrun=2
used option  fulljobname=./test6.tex
used option  input=./test6.tex
used option  kindofrun=2
used option  maxnofruns=8
used option  no-parse-first-line=true
used option  nonstopmode=true
used option  passon=-file-line-error -recorder -interaction nonstopmode

system   options  stop commandline options

system   options  start commandline files

used file   1: ./test6.tex

system   options  stop commandline files


publications start used btx commands


publications stop used btxcommands




[NTG-context] Submission

2014-02-18 Thread Rodrigo Ignacio Gamboa García

___
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] [Math in ConTeXt]

2014-02-18 Thread Matthias Weber
Thanks Otared for the offer to look into math issues.

Here are a few I noticed when TeXing an MK2 set of notes with MK4.

Matthias

\starttext
\startformula
\text{\bf R}^n = R^n ={\bf R}^n= \mathbb{R}^n
\stopformula
%spacing of  exponent is in Mk4 wider than in Mk2

\startformula
\left| \int_{a_{i-1}}^b e^x\, dx \right|
\stopformula
% lower bound runs into \left|
% space between integral sign and integrand too wide


\startformula
r'=r''
\stopformula

This $\int_{a}^b e^x\, dx $ is not good. 
% Inline math integrals need limits at the side. Spacing with lines below and 
above is awkward otherwise.

\startformula
area(f) = \iint_{\Omega} |{f_u\times f_v}|\, du dv
\stopformula

% limit not centered over double integral
\placeformula[-]

\stoptext


On Feb 16, 2014, at 5:30 AM, Otared Kavian ota...@gmail.com wrote:

 Hi all,
 
 After a series of exchanges on the list, on the topic of how mathematics 
 typesetting is and should be in ConTeXt, I am writing you this message to ask 
 all those who use ConTeXt to typeset mathematics and who encounter various 
 types of difficulties, or shortcomings, to send me their remarks, either on 
 list or off list. 
 I will check the problems with Aditya Mahajan and Mikael Sundqvist, and then 
 submit feature requests or bug reports to Hans and Aditya who will try to fix 
 the issues (I have asked these people about this, and they all agree…).
 
 In order to help me manage efficiently the task, please add the following tag 
 
   [Math on ConTeXt]
 
 to the Subject field of your message.
 
 The issues which may be addressed are of the following categories:
 
   1. Differences in the output of ConTeXt mkiv vs mkii (due to 
 differences in engine)
 
   2.  Differences in the output of ConTeXt mkiv vs LuaLaTeX + Opentype 
 math fonts (due to differences in macro package)
 
   3. Differences in the output of ConTeXt mkiv vs PDFLaTeX + AMSMath (due 
 to differences in expectation)
 
   4. Bug reports (regarding commands of plain TeX missing in ConTeXt, the 
 position of math accents, etc…)
 
 Indeed some of the issues may have their origin in the fonts (therefore not 
 easy to fix thouroughly), but others may be fixed once the expectations are 
 clearly expressed. 
 As usual, please give minimal examples imbedded in 
 
   \starttext
   ………
\stoptext 
 
 so that we can test the issue you are reporting.
 Thanks for your attention and cooperation,
 Best regards: OK
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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

[NTG-context] \completecontent affects text height

2014-02-18 Thread Thangalin
Hi,

First question:

1. Save http://pastebin.com/raw.php?i=8DQNCcvC as setup.tex
2. Save http://pastebin.com/raw.php?i=KgcxCxGB as garlic.tex
3. Run: context garlic.tex
4. View page 3 of the PDF ( http://i.imgur.com/VLwssnl.png )
5. Edit garlic.tex.
6. Remove \completecontent
7. Run: context garlic.tex
8. View page 3 of the PDF ( http://i.imgur.com/HVAoavQ.png )

The Table of Contents affects the column height in the body. The
available height for the text body should be independent of
\completecontent. The total height should be as shown in the second
example, with or without the ToC.

How can this be resolved?

Second question:

How would you remove the white space above each subsection title so
that the title is aligned to the top of its column?

Third question:

How would you prevent widowing of subsection titles from their
content? I tried ntop=2 and \setuptolerance[tolerant], but neither
affected the result.

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] Race Condition: Incorrect float numbering

2014-02-18 Thread Marco Patzer
On 2014–02–18 Andreas Schneider wrote:

 after many experiments I finally was able to extract a (kinda) minimal example
 that reproduces a problem which is haunting one of my documents.
 
 Under certain conditions (apparently a bunch of floats and page breaks) it
 happens, that a float is re-placed without being re-numbered, causing figure
 1.2 to be before 1.1.

I ran into this bug, too¹. The following should fix the numbering of
the floats.

  \ctxlua
{structures.lists.autoreorder = true}

However, the numbering of the lists are not adapted and come out
wrong. I don't have a fix for that.

Marco

¹ http://thread.gmane.org/gmane.comp.tex.context/79739


signature.asc
Description: Digital signature
___
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] \completecontent affects text height

2014-02-18 Thread Wolfgang Schuster

Am 18.02.2014 um 22:20 schrieb Thangalin thanga...@gmail.com:

 Hi,
 
 First question:
 
 1. Save http://pastebin.com/raw.php?i=8DQNCcvC as setup.tex
 2. Save http://pastebin.com/raw.php?i=KgcxCxGB as garlic.tex
 3. Run: context garlic.tex
 4. View page 3 of the PDF ( http://i.imgur.com/VLwssnl.png )
 5. Edit garlic.tex.
 6. Remove \completecontent
 7. Run: context garlic.tex
 8. View page 3 of the PDF ( http://i.imgur.com/HVAoavQ.png )
 
 The Table of Contents affects the column height in the body. The
 available height for the text body should be independent of
 \completecontent. The total height should be as shown in the second
 example, with or without the ToC.
 
 How can this be resolved?

Change

  \setuphead[chapter,section,subsection][header=none]

to

  \setuphead[chapter,section,subsection][header=high]


 Second question:
 
 How would you remove the white space above each subsection title so
 that the title is aligned to the top of its column?

Play with the grid key for mixed columns, e.g. grid=strut removes the space 
before the heading.


BTW: The context version of your \IngredientMeasure command can be written as:

  \define[1]\IngredientMeasure
{\doifsomething{#1}{#1}}

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

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


Re: [NTG-context] ConTeXt minimal on chromebook

2014-02-18 Thread Bill Meahan

On 2/18/2014 12:21 AM, Martin maaca Rehula wrote:

ChromeOS is Linux-based operating system. I don't know, what exactly is different 
compared to normal Linux distribution. You should be able to execute Linux 
binaries there.

.deb packages are not any ultra proprietary, extra DRM-protected things. It is 
just .tar.gz archive enclosed in the ar archive. So, you can easily extract 
files from the .deb package, copy them to your chromebook and execute them. I 
don't expect dependency on too many libraries.

Martin
_


Actually, ChromeOS only uses the Linux /kernel/ but is not a Linux 
distribution in any way, shape or form.


 No shell, no utilities, no package manager ala apt-get. It boots 
directly into Chrome and that is the only application that is permitted 
to run on it. Any apps must be written as Chrome extensions and have 
very limited ability to run directly on the kernel. Google intends 
everything to be written in HTML5/Javascript.


I won't even mention how Google reads almost everything to serve you 
better ads.


--
Bill Meahan, Westland, Michigan

For every problem there is a solution which is simple, clean
  -- and wrong. H. L. Mencken (1880 - 1956)
 
 


___
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] \completecontent affects text height

2014-02-18 Thread Thangalin
Thank you Wolfgang!

The header=high and mixed columns works perfectly.

   \define[1]\IngredientMeasure
 {\doifsomething{#1}{#1}}

This didn't work. For example, 24 snail became 24snail because
there is no measurement involved. I tried using { #!} (extra space),
but it didn't produce the desired result.

After making the changes, I noticed that the column text extends into
the footer:

1. http://pastebin.com/raw.php?i=is5cCp94 (works with setup.tex).
2. http://i.imgur.com/n1c6GFK.png

Any ideas how to stop columnar text from overflowing into the footer?

P.S.
In a different theme, the vertical rule extends beyond the text height
into the footer: http://i.imgur.com/XEpGQN5.png  -- I haven't isolated
this issue, but it might be related.

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


Re: [NTG-context] Indenting after floating image

2014-02-18 Thread Thangalin
Hi Jan,

A work-around:

\setupexternalfigures[location=default]
\setupindenting[yes,medium]

\define[1]\PlaceFigure{
  \startplacefigure[number=no, location={page}, title={}]
  \externalfigure[#1]
  \stopplacefigure
  \\ \vskip-1em
}

\starttext
\input{ward}
\PlaceFigure{cow}
\input{ward}
\stoptext

The wiki states:

\setupindenting does not take care of indenting after environments,
such as ConTeXt's itemizes, enumerations, definitions, formulas and
floats.

The work-around forces the new line using \\, then immediately skips
back a 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
___