Re: [NTG-context] column-spanning floats

2018-08-01 Thread Dr. Thomas Möbius
On Tue, 31 Jul 2018 14:06:43 +0200
Taco Hoekwater  wrote:

> 
> 
> > On 31 Jul 2018, at 13:57, Taco Hoekwater  wrote:
> > 
> > Hi all,
> > 
> > It used to be that in an example like the one attached where you
> > were using \startcolumns and used an \externalfigure that was wider
> > than the column width, the figure would automatically be moved to
> > the top of _both_ columns on the next page. 
> > 
> > That was a bit tricky sometimes, but worked fine. However, when I
> > run with the current mkiv beta, the figure is simply overlapping
> > the next column, and it does not auto-migrate. 
> > 
> > Also \startpostponing does not work here because it will indeed
> > move to the next page, but still only occupies the left column,
> > thus overlapping any text in the second column.
> > 
> > Is that functionality gone, or do I need to do something special?
> > 
> > Best wishes,
> > Taco
> > 
> > PS On top of that, the column balancing creates bad inter-paragraph
> > spacing in the left column. No idea where that comes from! :(
> 
> 
> Also, I just tried \definecolumnset, but a) the balance=yes key does
> not work, and b) I still get awful inter-par spacing on the left
> column, except with \setuplayout[grid=yes] (but that should not be
> needed to just get a reasonable placing, I think).
> 
> Taco

I would also love to see a solution to this. I also tried to play with
the \definecolumnset instead of the \startcolumns but when there are is
a lot of inline math, \definecolumnset produces just horrible inter-par
spacing.

Thomas
___
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] How to do an inline itemization?

2018-02-28 Thread Dr . Thomas Möbius

How to do an in-line / in-text itemization?

I would like to (i) enumerate something (ii) in the text (iii) but I 
don't know how.


Thank you!
Thomas
___
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] Word and character count excluding TeX-directives

2018-01-16 Thread Dr . Thomas Möbius
To meet some formal guidelines, I need to provide a word count of my 
abstract and a character count of the main text, and a character count 
of all the text appearing in figure captions.


Is this possible (maybe using some lua-magic)?

Thank you!
Thomas


Minimal example:

\definestartstop
[abstract]
[style=bold,
after={\blank[big]}]

\starttext
\title{My title: example of a word and character count}

{\strut\tfx Formal guidelines: word count of abstract: $x$, character
count of main text: $x$, character count of figure captions: $x$.}
\blank

\startabstract
This is the abstract. Read this and that.
\stopabstract

% start of the main text
Some random text with formulas

\startformula
y = α + βx + ε, \quad ε \sim N(0,σ^2)
\stopformula

And there are also figures with captions.

\startplacefigure[
location=bottom,
title={Residual plot with time $t$ on the x-axis and
residuals $e_{jt}$ on the y-axis},
reference={fig:subject-residual}]
\externalfigure[residuals][height=.242\textheight]
\stopplacefigure

And some more text with $x$ and $y$ and $z$, and \placeformula

\startformula \startalign
\NC a =\NC b \NR
\NC c =\NC d \NR
\stopalign \stopformula

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

Re: [NTG-context] Why is [left=(, right=)] ignored when using the aps btx rendering specification?

2018-01-04 Thread Dr . Thomas Möbius

To answer my own question, it must be

\usebtxdefinitions[aps]

\setupbtxlist
  [aps]
  [alternative=b,
   after=,
   before=]

\definebtx
  [aps:cite:num]
  [left={(},
   right={)}]

\definebtx
  [aps:list:numbering]
  [aps:list]
  [left={(},
   right={)}]



Am 03.01.2018 um 09:38 schrieb Dr. Thomas Möbius:
Why is [left=(, right=)] ignored in \setupbtx when using the aps btx 
rendering specification?



This works:

\usebtxdataset
     [default]
     [../bibliography/bibliography]

\setupbtx
     [default:cite:num]
     [left=(,right=)]

\setupbtx
     [default:list]
     [left=(,right=),authorconversion=invertedshort]

\starttext

\cite[Carp:2012a, Carp:2012b]
\cite[Weishaupt:2014]
\cite[Knecht:2003]
\cite[Jansen:2006b]

\subject{References}

\placelistofpublications

\stoptext


So, why does this not work?

\usebtxdataset
     [default]
     [../bibliography/bibliography]

\usebtxdefinitions[aps]

\setupbtx
     [aps:cite:num]
     [left=(,right=)]

\setupbtx
     [aps:list]
     [left=(,right=),authorconversion=invertedshort]

\starttext

\cite[Carp:2012a, Carp:2012b]
\cite[Weishaupt:2014]
\cite[Knecht:2003]
\cite[Jansen:2006b]

\subject{References}

\placelistofpublications

\stoptext

Thank you for your 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
___

___
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] Why is [left=(, right=)] ignored when using the aps btx rendering specification?

2018-01-03 Thread Dr . Thomas Möbius
Why is [left=(, right=)] ignored in \setupbtx when using the aps btx 
rendering specification?



This works:

\usebtxdataset
[default]
[../bibliography/bibliography]

\setupbtx
[default:cite:num]
[left=(,right=)]

\setupbtx
[default:list]
[left=(,right=),authorconversion=invertedshort]

\starttext

\cite[Carp:2012a, Carp:2012b]
\cite[Weishaupt:2014]
\cite[Knecht:2003]
\cite[Jansen:2006b]

\subject{References}

\placelistofpublications

\stoptext


So, why does this not work?

\usebtxdataset
[default]
[../bibliography/bibliography]

\usebtxdefinitions[aps]

\setupbtx
[aps:cite:num]
[left=(,right=)]

\setupbtx
[aps:list]
[left=(,right=),authorconversion=invertedshort]

\starttext

\cite[Carp:2012a, Carp:2012b]
\cite[Weishaupt:2014]
\cite[Knecht:2003]
\cite[Jansen:2006b]

\subject{References}

\placelistofpublications

\stoptext

Thank you for your 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] Adjust rendering of BibTeX entries

2017-11-23 Thread Dr . Thomas Möbius

Dear list,

I would like to render BibTeX-entries with the provided
APA-style, however, in the text use superscript cross references.  I
have the following issues, which I don't know how to resolve. I was
hoping, you could help me.

1. When choosing the style APA, the change to \setupcite seems to be
   ignored, see the minimal example below. (When changing
   alternative=apa back to alternative=ams, it works again.)

2. As I am citing bibliography entries with numbers, adding letters to
   the end of the publication years makes no sense.  How can I
   loose the letters? Now, also the provided AMS-style adds these
   letters, which I don't think should be the case, too.

3. The edition field when citing a book is rendered wrong. It should be
   7th edition followed by a period. (Compare this with the ams-style,
   where the edition field is rendered correctly.) How can I add the
   period and automatically add the st, nd, rd, th to a edition number?

4. Say, I would revert back to AMS-style but using superscripts rather
   than the [#Number] default.  How can I loose the square brackets in
   the reference section?

Thank you very much in advance.

Thomas


example.tex
\setupbibtex[database={references},sort=author]
\setuppublications[alternative=apa,sorttype=authoryear,numbering=yes]

\setupcite[num][
left=\raisebox{1ex}\hbox\bgroup\tfxx,
right=\egroup,
lastpubsep={, }]

\starttext
\title{Test with APA}

\section{Some text}
This\cite[Mustermann:2014, Doe:2012a] and that,\cite[Doe:2012b] also
that\cite[Doe:2012a] and this book.\cite[Mustermann:2001]

\section{References}
\placepublications [criterium=text]
\stoptext

example.bib
@article{Mustermann:2014,
title   = {One hell of a title},
author  = {Max {Mustermann}},
journal = {SomeJournal},
year= 2014,
volume  = 63,
number  = 2,
pages   = {289-298}
}

@article{Doe:2012b,
title   = {Another title},
author  = {John {Doe}},
journal = {SomeJournal},
year= 2012,
volume  = 3,
number  = 2,
pages   = {189-198},
}

@article{Doe:2012a,
title   = {Foo Bar Zap},
author  = {John {Doe}},
journal = {SomeJournal},
year= 2012,
volume  = 4,
number  = 1,
pages   = {89-92},
}

@book{Mustermann:2001,
title = {How does this work?},
author= {Max {Mustermann}},
publisher = {Springer},
year  = {2014},
edition   = 7,
address   = {Berlin/Heidelberg}
}
___
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] Two column layout with footnotes do not work as expected

2015-10-23 Thread Dr. Thomas Möbius

Hi,

footnotes in two column layouts are typeset at the bottom of the 
respected column but with the width of two columns.


Expected: 1) Either footnotes spanning the whole page from left to right 
at the bottom of the page. 2) Or have the footnote be restricted to one 
column only.


How can I achieve the former?

I would be thankful for help.

Best,
Thomas

mtx-context | ConTeXt Process Management 0.61
mtx-context |
mtx-context | main context file: 
/usr/share/texmf/tex/context/base/context.mkiv

mtx-context | current version: 2015.07.01 21:40

Minimal example: On the first page, footnotes run into each other. On 
the second page, footnote runs into text.


\setuppapersize[A5][A5]

\setupbodyfont[10pt]

\definestartstop[abstract]
[before={\blank\midaligned{\bf Abstract}\startnarrower[2*middle]},
after={\stopnarrower\blank[big]}]

\definecolumnset[TwoColumns][n=2]

\starttext
\title{Two Column Layout with Footnotes Spanning Page}

\startabstract
Footnotes start at the wrong place.
And why is blank[big] ignored after this abstract?
\stopabstract

\godown[1em]

\startcolumnset[TwoColumns]
\section{The first}
This is a test.\footnote{Why do footnotes
only span this one column and don't go
across the whole space?}
\input knuth
\footnote{Why do footnotes
only span this one column and don't go
across the whole space?}
\input knuth
\input knuth
\footnote{Why do footnotes
only span this one column and don't go
across the whole space?}
\input knuth
\input knuth
\input knuth
\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
___

[NTG-context] How to define a new environment / function?

2015-06-17 Thread Dr. Thomas Möbius

Dear list,

having used ConTeXt for years now, I am the first time in need
to, well, programming something. And I realised, I am a little bit
lost. I have a rather long list of variable descriptions that I would
like to typeset in a usable and readable way. It should look something
like this:

---snip: minimal example---
\starttext
\setupdelimitedtext[blockquote]

{{\bf Geschlecht} \qquad Geschlecht \hfill $0,1$}

\startblockquote
Das Geschlecht des Probanden.
\stopblockquote

\blank
{{\bf SoB} \qquad Geburtssaison \hfill $1,\dots,4$}

\startblockquote
Jahreszeit der Geburt. Kodierung: 1 = Winter, 2 = Frühling, 3 = Sommer,
4 = Herbst.
\stopblockquote

\blank
{{\bf BildungV} \qquad Bildung Vater \hfill $1,\dots,6$}

\startblockquote
Ordinale Beschreibung der Bildung des Vaters zum Zeitpunkt der Erhebung.
Kodierung: 0 = kein Abschluss, 1 = Volksschule, 2 = Hauptschule, 3 =
Realschule, 4 = Fachabitur, 5 = Abitur, 6 = Studium.
\stopblockquote

\blank
{{\bf BildungM} \qquad Bildung Mutter \hfill $1,\dots,6$}

\startblockquote
Ordinale Beschreibung der Bildung der Mutter zum Zeitpunkt der Erhebung.
Kodierung siehe {\bf BildungV}.
\stopblockquote

\blank
{{\bf Urb15} \qquad Urbanität \hfill $\naturalnumbers$}

\startblockquote
Beschreibung der Urbanität des Umfelds in den ersten 15 Lebensjahren.
Kodierung: $\sum_{i=1}^{15} u_i$ mit $u_i=$ ein Punkt für eine Stadt bis
10.000 Einwohner, 2 Punkte für bis 100.000 Einwohner, 3 Punkte über
100.000 Einwohner im Jahr $i$.
\stopblockquote

\blank
{{\bf LQ} \qquad Händigkeit \hfill $(0,1)$}

\startblockquote
Lateralisierungsquotient, wobei -1 = perfekt linkshändig und +1 =
perfekt rechtshändig.
\stopblockquote

\stoptext
---end snip---

What I would like to have is a function/environment/something that would
allow me to write the above text in the following way:

---snip: want to example---
\starttext

\startvariable [alias=Geschlecht, name=Geschlecht, range={$0,1$}]
Das Geschlecht des Probanden.
\stopvariable

\startvariable [alias=SoB, name=Geburtssaison, range={$1,\dots,4$}]
Jahreszeit der Geburt. Kodierung: 1 = Winter, 2 = Frühling, 3 = Sommer,
4 = Herbst.
\stopvariable

\startvariable [alias=BildungV, name={Bildung Vater},
range={$1,\dots,6$}, reference=bildungDesVater]
Ordinale Beschreibung der Bildung des Vaters zum Zeitpunkt der Erhebung.
Kodierung: 0 = kein Abschluss, 1 = Volksschule, 2 = Hauptschule, 3 =
Realschule, 4 = Fachabitur, 5 = Abitur, 6 = Studium.
\stopvariable

\startvariable [alias=BildungM, name={Bildung Mutter},
range={$1,\dots,6$}]
Ordinale Beschreibung der Bildung der Mutter zum Zeitpunkt der Erhebung.
Kodierung siehe \in[bildungDesVater].
\stopvariable

\startvariable [alias=Urb15, name=Urbanität, range={$\naturalnumbers$}]
Beschreibung der Urbanität des Umfelds in den ersten 15 Lebensjahren.
Kodierung: $\sum_{i=1}^{15} u_i$ mit $u_i=$ ein Punkt für eine Stadt bis
10.000 Einwohner, 2 Punkte für bis 100.000 Einwohner, 3 Punkte über
100.000 Einwohner im Jahr $i$.

\startvariable [alias=LQ, name=Händigkeit, range={$(0,1)$}]
Lateralisierungsquotient, wobei -1 = perfekt linkshändig und +1 =
perfekt rechtshändig.
\stopvariable

\stoptext
---end snip---

Could someone point me in the right direction, or get me started
somehow? Is this difficult to accomplish? Or is it super easy and I just 
don't know it?


Thank you so much!

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