Re: [NTG-context] placing a wide float at the bottom

2018-02-10 Thread Rik Kabel

On 2018-02-10 10:00, Henning Hraban Ramm wrote:

\placefigure[bottom]{}{\externalfigure[hacker][width=\textwidth]}
works just fine,
I get "top" placement with
\placefigure[bottom]{}{\externalfigure[hacker][width=\paperwidth]}


Works here with the code below. The same result with and without adding 
"force". Result attached.


Do you have an MWE?

   \showframe
   \starttext
 some text
   \placefigure[top]{top
   textwidth}{\externalfigure[hacker][width=\textwidth]}
 some text
   \page
 some text
   \placefigure[here]{here
   textwidth}{\externalfigure[hacker][width=\textwidth]}
 some text
   \page
 some text
   \placefigure[bottom]{bottom
   textwidth}{\externalfigure[hacker][width=\textwidth]}
 some text
   \page
 some text
   \placefigure[top,force]{top force
   paperwidth}{\externalfigure[hacker][width=\paperwidth]}
 some text
   \page
 some text
   \placefigure[here,force]{here force
   paperwidth}{\externalfigure[hacker][width=\paperwidth]}
 some text
   \page
 some text
   \placefigure[bottom,force]{bottom force
   paperwidth}{\externalfigure[hacker][width=\paperwidth]}\stopmode
 some text
   \page
 some text
   \placefigure[top]{top
   paperwidth}{\externalfigure[hacker][width=\paperwidth]}
 some text
   \page
 some text
   \placefigure[here]{here
   paperwidth}{\externalfigure[hacker][width=\paperwidth]}
 some text
   \page
 some text
   \placefigure[bottom]{bottom
   paperwidth}{\externalfigure[hacker][width=\paperwidth]}
 some text
   \stoptext


--
Rik




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

[NTG-context] To \getbuffer or to \input: which one is it better?

2018-02-10 Thread Otared Kavian
Hi all,

In a project using the \setvariables command of ConTeXt, a file containing more 
than 200 instances of a structure resembling (but with much more fields…)

\setvariables[talk]
[speaker={Dr Some Speaker},
title={Some title},
room={Some Room},
]

is input several times, in order to extract from these variables one or more 
informations to be typeset, for different types of documents. However I don’t 
know whether this is a wise solution, or is it better to define once and for 
all a buffer and then use the \getbuffer command for each of the different uses 
in my global document.

For now, unfortunately, I cannot come up with a minimal example because the 
question I am asking is about a real situation where nothing is minimal. That 
is why I am asking a general abstract question to understand the general 
philosophy underlining the buffer commands versus the \input command.

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

[NTG-context] placing a wide float at the bottom

2018-02-10 Thread Henning Hraban Ramm
Ahoi,

while
\placefigure[bottom]{}{\externalfigure[hacker][width=\textwidth]}
works just fine,
I get "top" placement with
\placefigure[bottom]{}{\externalfigure[hacker][width=\paperwidth]}

I.e. if the figure exceeds \textwidth, bottom placement fails.
I’m actually trying to place page wide images including bleed.

I’d guess this is a bug. Or can I do anything about it?


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] Unexpected emergency stop

2018-02-10 Thread Tim Steenvoorden
Thanks Wolfgang, that’s a clear and easy explanation!

Cheers,
Tim
Op za 10 feb. 2018 om 13:46 schreef Wolfgang Schuster <
schuster.wolfg...@gmail.com>

>
> Tim Steenvoorden 
> 10. Februar 2018 um 12:44
>
> Thanks Otared! Works like a charm!
>
> Out of curiosity, could you explain the mechanics behind this? I know it
> is a commonly used trick in TeX macro definitions, but I don’t know how it
> changes TeX’s understanding of the tokes it parses.
>
>
> When you create a new commands like this
>
> \def\mycommand[#1]{...}
>
> the brackets are delimiters for the argument of the command, i.e. when TeX
> sees
> \mycommand it looks for [ and grabs everything intill ] as as argument.
> When you
> out now a space (or start a new line) after ] in your definition of the
> command, e.g.
>
> \def\mycommand[#1] {...}
>
> TeX looks now for “] ” (right bracket followed by a space) as delimiter for
> the argument of your command.
>
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___

-- 

T.J. Steenvoorden, MSc

PhD Candidate | Radboud University Nijmegen
Faculty of Science | Department of Software Science
Mercator 1 Building | Room 01.08
Toernooiveld 212 | 6525 EC | Nijmegen | The Netherlands
+31 24 365 22 91 | t.steenvoor...@cs.ru.nl
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Unexpected emergency stop

2018-02-10 Thread Wolfgang Schuster



Tim Steenvoorden 
10. Februar 2018 um 12:44
Thanks Otared! Works like a charm!

Out of curiosity, could you explain the mechanics behind this? I know 
it is a commonly used trick in TeX macro definitions, but I don’t know 
how it changes TeX’s understanding of the tokes it parses.


When you create a new commands like this

\def\mycommand[#1]{...}

the brackets are delimiters for the argument of the command, i.e. when 
TeX sees
\mycommand it looks for [ and grabs everything intill ] as as argument. 
When you
out now a space (or start a new line) after ] in your definition of the 
command, e.g.


\def\mycommand[#1] {...}

TeX looks now for “] ” (right bracket followed by a space) as delimiter for
the argument of your command.

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

Re: [NTG-context] Unexpected emergency stop

2018-02-10 Thread Tim Steenvoorden
Thanks Otared! Works like a charm!

Out of curiosity, could you explain the mechanics behind this? I know it is
a commonly used trick in TeX macro definitions, but I don’t know how it
changes TeX’s understanding of the tokes it parses.

Cheers,
Tim

Op vr 9 feb. 2018 om 20:50 schreef Otared Kavian :

> Hi Tim,
>
> Welcome back to ConTeXt!
> When one defines a command, in particular when using the brackets […], it
> is wise to put a percent sign at the end of the line if one changes the
> line on which the macro is defined.
> In your case, saying
>
> \definemacro\see[#1:#2]%
> {\dosee{#1}{#2}}
>
> suppresses the problem you are reporting (at least here on my machine
> running MacOS 10.13.3 and the latest beta as yours).
>
> Best regards: OK
>
> On 9 Feb 2018, at 19:03, Tim Steenvoorden 
> wrote:
>
> Dear all,
>
> After some time I’m back to ConTeXt and I dug up some old macros. I used
> to define a \see macro to automatically insert labels like “chapter”,
> "figure" etc. in front of a reference based on the structure of the label.
> Below you'll find its definition.
>
> It worked in MKIV about two years ago, nevertheless, now ConTeXt hangs
> when placing punctuation after the command. I.e. TeX hangs with an
> emergency stop (“*" on the terminal) after all files have been processed
> (after cont-yes.mkiv is closed).
>
> What am I doing wrong that such a thing happens?
>
> I’m on macOS 10.13.3 with minimals beta 2018.02.09 00:04.
>
> Cheers,
> Tim
>
>
> ––
>
> \starttext
>
> \definemacro\see[#1:#2]
>   {\dosee{#1}{#2}}
>
> \starttexdefinition dosee #1#2
>   \doifdefinedelse{in#1}
> {\getvalue{in#1}[#1:#2]}
> {\writestatus{references}{reference format in#1 not defined}
>  \in[#1:#2]}
> \stoptexdefinition % #3 is optional and gobbled by \in
>
> \definereferenceformat[inchp]
>   [text=\word{\labeltext{chapter}}]
>
> \setuplabeltext[en]
>   [chapter=Chapter~]
>
> \chapter[chp:first]{First}
>
> Works:
> \see[chp:first]
>
> Hangs:
> \see[chp:first],
>
> \stoptext
>
> ––
> --
> 
> T.J. Steenvoorden, MSc
>
> PhD Candidate | Radboud University Nijmegen
> Faculty of Science | Department of Software Science
> Mercator 1 Building | Room 01.08
> Toernooiveld 212 | 6525 EC | Nijmegen | The Netherlands
> +31 24 365 22 91 | t.steenvoor...@cs.ru.nl
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://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
>
> ___

-- 

T.J. Steenvoorden, MSc

PhD Candidate | Radboud University Nijmegen
Faculty of Science | Department of Software Science
Mercator 1 Building | Room 01.08
Toernooiveld 212 | 6525 EC | Nijmegen | The Netherlands
+31 24 365 22 91 | t.steenvoor...@cs.ru.nl
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___