\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===
How can I use a variable to steer \switchtobodyfont size?
You need \the\, i.e.
\switchtobodyfont[\the\relationsFontSize]
but I would use the measure command, e.g.
\definemeasure[relationsFontSize][8pt
Yes! Finally! Thank you, Wolfgang!
Am 13.11.22 um 13:17 schrieb Wolfgang Schuster via ntg-context:
Henning Hraban Ramm via ntg-context schrieb am 13.11.2022 um 11:37:
\definemeasure[SpineWidth][2mm + (0.135mm * \noffigurepages/2)]
You can try
\expanded{\definemeasure[SpineWidth
[CONTENT]
\definemeasure[SpineWidth][2mm + (0.135mm * \noffigurepages/2)]
You can try
\expanded{\definemeasure[SpineWidth][...]}
That works so far, if I output \measure{SpineWidth} it shows the right
size (~42pt).
But if I use this measure in
\setlayer[width=\measure{SpineWidth}]{...}
it’s
One problem left with dimensions that I can’t reproduce in a minimal
example:
I want to calculate the spine width of the cover from the number of
content pages:
\useexternalfigure[CONTENT][book.pdf]
\getfiguredimensions[CONTENT]
\definemeasure[SpineWidth][2mm + (0.135mm * \noffigurepages/2
Am 04.11.22 um 11:52 schrieb Herbert Voss via ntg-context:
\definemeasure[FlapWidth][\measured{PageWidth} * 0.8]
\definemeasure[FlapWidth][0.8\measured{PageWidth}]
works
Yes, thank you!
That’s why I asked for the basics in my first post – which operators can
I use how, in which order
with dimension calculations. Is there
anything I can read about the possibilities and limitations?
e.g. with
\definemeasure[PageWidth][132mm]
none of the following works:
\definemeasure[FlapWidth][0.8 * \measure{PageWidth}]
use \measured (with a "d" to get a dimension)
Only in expres
the possibilities and limitations?
e.g. with
\definemeasure[PageWidth][132mm]
none of the following works:
\definemeasure[FlapWidth][0.8 * \measure{PageWidth}]
use \measured (with a "d" to get a dimension)
Only in expressions like that or always?
In https://source.contextgarden.net/syst-aux.mki
Am 03.11.22 um 21:51 schrieb Hans Hagen via ntg-context:
On 11/3/2022 9:32 PM, Henning Hraban Ramm via ntg-context wrote:
I’m constantly struggling with dimension calculations. Is there
anything I can read about the possibilities and limitations?
e.g. with
\definemeasure[PageWidth][132mm
On 11/3/2022 9:32 PM, Henning Hraban Ramm via ntg-context wrote:
I’m constantly struggling with dimension calculations. Is there anything
I can read about the possibilities and limitations?
e.g. with
\definemeasure[PageWidth][132mm]
none of the following works:
\definemeasure[FlapWidth][0.8
I’m constantly struggling with dimension calculations. Is there anything
I can read about the possibilities and limitations?
e.g. with
\definemeasure[PageWidth][132mm]
none of the following works:
\definemeasure[FlapWidth][0.8 * \measure{PageWidth}]
\definemeasure[FlapWidth][.8\measure
:
\startcombination[3*1]
{\externalfigure[cow] [width=.3\textwidth]}{cow}
{\externalfigure[mill] [width=.3\textwidth]}{mill}
{\externalfigure[hacker][width=.3\textwidth]}{hacker}
\stopcombination
But that’s ugly and tedious. Hans did it for you:
\definemeasure[combination][
(\textwidth
irect like
"width=\GetDim{myframes}{FTitle}
2/ to replace
context("\\definemeasure[#2W][" .. (n.width /65536) .. "pt]")
by a more "luametatexish" formulation
Le 28/05/2022 à 20:25, Garulfo a écrit :
some progress... if it can help.
No more i
* tex.sp"1em" .. "sp"}]
> \stoptexdefinition
>
> \definemeasure[xheight][2.5pt]
>
> \starttext
> \setxheight[adventor][10\measured{xheight}] Hello!
> \stoptext
>
>
> -- Max
>
___
]
\switchtobodyfont[#1, 12pt]
\scratchdimen=\dimexpr#2\relax
\switchtobodyfont[#1, \cldcontext{tex.dimen.scratchdimen / tex.sp"1ex" *
tex.sp"1em" .. "sp"}]
\stoptexdefinition
\definemeasure[xheight][2.5pt]
\starttext
\setxheight[advento
022-05-27 12:03, Stefan Nedeljkovic via ntg-context wrote:
>
> Thank you very much Aditya for looking into this. But I still have the
> same baseline grid offset problem. Interestingly, when I remove the
> columns, the text shifts downwards by two lines.
> My code:
>
, the text shifts downwards by two lines.
My code:
\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]
% Since all distances are in terms of base units, specify the paper
size in those
% terms as well.
\definepapersize[slide][width=26\measured{base},height=20\measured{base
Thank you very much Aditya for looking into this. But I still have the same
baseline grid offset problem. Interestingly, when I remove the columns, the
text shifts downwards by two lines.
My code:
\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]
% Since all distances
h is not a multiple of base units. I have tweaked the
code below so that it is.
\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]
% Since all distances are in terms of base units, specify the paper size in
those
% terms as well.
\definepapersize[slide][width=26\measu
space at the bottom.
2. The number of columns is 21.5, that is the first column is 0.5 units
wide and the rest are 1 unit wide.
How would I achieve this?
Here is what I got right now:
\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]
\definepapersize[slide][width=80
value. When you use something like 2\measure{...}
>> ConTeXt uses the "2" followed by the value of the measure, the following
>> example demonstrates this in the second output.
>>
>> begin example
>> \definemeasure [point] [1pt]
>>
>>
nTeXt uses the "2" followed by the value of the measure, the following
> example demonstrates this in the second output.
>
> begin example
> \definemeasure [point] [1pt]
>
> \starttext
>
> \startbuffer
> \tex{measure}: \measure{point}
>
> \tex{measure
{...}
ConTeXt uses the "2" followed by the value of the measure, the following
example demonstrates this in the second output.
begin example
\definemeasure [point] [1pt]
\starttext
\startbuffer
\tex{measure}: \measure{point}
\tex{measured}: \the\measured{point}
\stopbuffer
\
all around the page (see slide_grid_overlay.pdf). Here is my current
attempt:
%\input fonts
\definemeasure[base][0.1in]
\definemeasure[zero][0in]
\definepapersize[slide][width=80\measure{base},height=60\measure{base}]
\setuppapersize[slide]
\setuplayout[
leftedge=\measure{zero
setuppapersize[A5][A4]
\setuplayout[
marking=on,
location=middle,
]
\definemeasure[Bleed][3mm]
\definemeasure[MaxHeight]
[{\dimexpr\paperheight + 2\measure{Bleed}\relax}]
\definemeasure[MaxWidth]
[{\dimexpr\paperwidth + 2\measure{Bleed}\relax}]
\definelayer[papier
):
\useMPlibrary[dum]
\setuppapersize[A5][A4]
\setuplayout[
marking=on,
location=middle,
]
\definemeasure[Bleed][3mm]
\definemeasure[MaxHeight][{\dimexpr\paperheight + 2\measure{Bleed}\relax}]
\definemeasure[MaxWidth][{\dimexpr\paperwidth + 2\measure{Bleed}\relax}]
\definelayer[papier][
preset
irst line):
>
>
> \useMPlibrary[dum]
>
> \setuppapersize[A5][A4]
> \setuplayout[
> marking=on,
> location=middle,
> ]
> \definemeasure[Bleed][3mm]
> \definemeasure[MaxHeight][{\dimexpr\paperheight + 2\measure{Bleed}\relax}]
> \definemeasure[MaxWidth][{\d
always starts below the
first line):
\useMPlibrary[dum]
\setuppapersize[A5][A4]
\setuplayout[
marking=on,
location=middle,
]
\definemeasure[Bleed][3mm]
\definemeasure[MaxHeight][{\dimexpr\paperheight + 2\measure{Bleed}\relax}]
\definemeasure[MaxWidth][{\dimexpr\paperwidth + 2\measure{Bleed
:
\definemeasure[Indentation][1cm]
\definenarrower
[LinesIndentation]
[ before=\blank,
after=\blank,
default=left,
left=\measure{Indentation}]
\definelines
[Poem]
[ before=\startLinesIndentation,
after=\stopLinesIndentation,
indenting={yes,-\measure{Indentation
]
\stopalignment
}}
\stopsetups
\startsetups[text b]
\raise\MarginRaise\hbox{\vtop{\hsize=\Margin%
\startalignment[left]
\getmarking[section]
\stopalignment
}}
\stopsetups
\definemeasure [MarginWidth] [2cm]
\definemeasure [MarginRaise] [56ex]
\defineframed
[MarginBlock]
[frame=off,
width
tion and does not otherwise? How to
> > avoid it (if at all possible)?
> >
> > I have this delimitedtext instance called 'amnata' defined as below:
> >
> > \definemeasure[amnatamargin][3cm]
> > \definedelimitedtext
> >
> > [amnata]
>
ve this delimitedtext instance called 'amnata' defined as below:
>
> \definemeasure[amnatamargin][3cm]
> \definedelimitedtext
> [amnata]
> \setupdelimitedtext
> [amnata]
> [
> left=,
> right=,
> leftmargin={\measure{amnatamargin}},
> right
to avoid it
(if at all possible)?
I have this delimitedtext instance called 'amnata' defined as below:
\definemeasure[amnatamargin][3cm]
\definedelimitedtext
[amnata]
\setupdelimitedtext
[amnata]
[
left=,
right=,
leftmargin={\measure{amnatamargin}},
rightmargin={\measure
l possible)?
>
> I have this delimitedtext instance called 'amnata' defined as below:
>
> \definemeasure[amnatamargin][3cm]
> \definedelimitedtext
> [amnata]
> \setupdelimitedtext
> [amnata]
> [
>left=,
>right=,
>leftmargin={\measure{amnatamargin}
ve this delimitedtext instance called 'amnata' defined as below:
>
> \definemeasure[amnatamargin][3cm]
> \definedelimitedtext
> [amnata]
> \setupdelimitedtext
> [amnata]
> [
> left=,
> right=,
> leftmargin={\measure{amnatamargin}},
> right
Dear list,
In short, my question is: why does \wordright cause a line-break when the line
preceding it breaks with hyphenation and does not otherwise? How to avoid it
(if at all possible)?
I have this delimitedtext instance called 'amnata' defined as below:
\definemeasure[amnatamargin][3cm
lt][protrusion=quality,expansion=quality,onum=no,lnum=yes]
>
> % \definefirstline below requires a font that implements small capitals as
> % a feature (Latin Modern does not). I have used this:
> % \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
> % tf=name:Sorts Mi
[Sorts Mill Goudy] [
% tf=name:Sorts Mill Goudy Regular,
% it=name:Sorts Mill Goudy Italic,
% ]
% If you don't have the font above, try this:
\setupbodyfont[heros]
\setupbodyfont[mainfont,11pt]
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
% Every chapter
er to your question, but I'd like to point out that
> you can keep using lettrine with ConTeXt LMTX, if you wish. You just
> need to add the modules manually, currently:
>
>https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
I’ve tried this. Installed the modules and t
With the following minimal example:
\definemeasure[CAindent][12pt]
% Every chapter body text starts with a drop cap:
\setupinitial[n=3,m=1,-\measure{CAindent}]]
\setupindenting[yes,\measure{CAindent}]
\starttext
\placeinitial S{\bf{\kap uppose we}} have a system for the approval of
loans. \input
.. http://www.sudelbuch.de
Privater Blog: http://www.hasecke.eu
Netzliteratur-Projekt: http://www.generationenprojekt.de
\startmode[bleed-1mm]
\definemeasure
[bleed]
[1mm]
\stopmode
\startmode[bleed-2mm]
\definemeasure
[bleed]
[2mm]
\stopmode
\startmode[bleed-3mm]
\definemeasure
[bleed
zes inside
square roots and fractions seem to be gone.
% Testfile starts here
\setupbodyfont[stixtwo,10bp]
\definemeasure[myitemwidth][26bp]
\definemeasure[myindent][12bp]
\setupindenting[yes,\measure{myindent}]
\definecharacterkerning[sats][factor=0.1]
\define[1]\vakuum{\hskip\measur
gt; > despite me having "before={},after={}" in the \setuphead commands
> > for all the levels of sections.
> > * And it had a large unwanted white space between paragraphs until I
> > \setupwhitespace[none]. I'd prefer a little bit of white space
>
ace between paragraphs until I
\setupwhitespace[none]. I'd prefer a little bit of white space
between paragraphs, but I tried \setupwhitespace[0.5ex] and
\definemeasure[between][0.25ex] with
\setupwhitespace[\measure{between}], and \setupwhitespace[5pt] but
all those went back to way too much
e between
paragraphs, but I tried \setupwhitespace[0.5ex] and
\definemeasure[between][0.25ex] with \setupwhitespace[\measure{between}],
and \setupwhitespace[5pt] but all those went back to way too much white
space between paragraphs.
Any ideas?
--
T.
?
Module: \def etc.
Document/Style: \setvariable(s) because \getvariable works also for
unknown keys.
Should I use a \newdimen for every custom measure that I want to use with
\dimexpr, e.g.
\def\MyWidth{10mm}
or better
\newdimen\MyWidth
\MyWidth=10mm
?
\definemeasure [MyWIdth] [10mm
is shorter (97mm) than the other
> pages (100mm)
>
> %% This measure shows how much shorter the folded page is.
> \definemeasure
> [shortfold]
> [3mm]
>
> %% The bleed measure is necessary if you have colored page
> backgrounds
> %% or images in the bleed.
>
)
%% This measure shows how much shorter the folded page is.
\definemeasure
[shortfold]
[3mm]
%% The bleed measure is necessary if you have colored page backgrounds
%% or images in the bleed.
%% Different print shops need different bleeds.
\definemeasure
[bleed]
[1mm
nt[heros,8pt]
\testpage[15]
% Calculamos el tamaño de la columna matriz. \textwidth tiene el ancho de la
% linea en puntos (en la documentación indica que es el ancho del contexto en el
% que se encuentra). Dividimos entre el total de columnas menos las columnas que
% son llamadas y las que son separadoras
) how to reduce
things...
Thanks for any help
De Benny
%% This is a template for a Din lang Folder.
%% The folded page of such a flyer is shorter (97mm) than the other pages (100mm)
%% This measure shows how much shorter the folded page is.
\definemeasure
[shortfold]
[3mm]
%% The bleed
> You can set dimensions with the measure system
>
> %\definemeasure [TestValue] [20pt]
>
> \starttext
> \measure{TestValue}
> \stoptext
>
> and other values with \setvariables
>
> %\setvariables [test] [abc=20]
Probably the .tuc hystersis can jump up and bite
eems like overkill (although in my scripts that I use
for running expeirments with blocks etc., I take this approach), and
maybe there is a simpler way.
You can set dimensions with the measure system
%\definemeasure [TestValue] [20pt]
\starttext
\measure{TestValue}
\stoptext
and other
On Tue, 25 Sep 2018 12:57:54 +0200
"Jan U. Hasecke" wrote:
> \definemeasure
> [bleed]
> [3mm]
>
> I used this value to generalize the A4-flyer dimensions.
>
> \definepapersize
> [A4-flyer]
> [width=\dimexpr297mm+2\measured{bleed}\r
eshift works.
\definemeasure
[bleed]
[3mm]
I used this value to generalize the A4-flyer dimensions.
\definepapersize
[A4-flyer]
[width=\dimexpr297mm+2\measured{bleed}\relax,
height=\dimexpr210mm+2\measured{bleed}\relax]
But horizontal pageshift is beyond my grasp.
I c
acefigure … \stopplacefigure. Then
context takes care of the rest.
> An now here is my question. Is there a value I can simply change to
> have a pdf with only 1mm bleed?
No, I used the fact that bleed = shortfold = 3mm. The was of course
not very generic. You should create a new variable:
\def
1mm bleed?
Only adjusting the papersize A4-flyer to 299mm/212mm does not work of
course.
TIA
juh
%% The page shift of page #6 needs to be adjusted if the value is changed, no
%% clue why.
%% A4-flyer pagesize needs to be adjusted as well
\definemeasure
[shortfold]
[3mm]
\definepapersize
page design in the file.
Marco
%% The page shift of page #6 needs to be adjusted if the value is changed, no
%% clue why.
%% A4-flyer pagesize needs to be adjusted as well
\definemeasure
[shortfold]
[3mm]
\definepapersize
[A4-flyer]
[width=303mm,
height=216mm]
\definepapersize
[flyer-page
Hello,
The idea is to put all the examples of the course in the margin. I see that
the text is sometimes overflowing. How to improve the code ?
Thanks.
Fabrice
\definemeasure[Margin][3.5cm]
\setuplayout
[
backspace=20mm,
width=120mm,
height=middle,
footer=\bodyfontsize
On 7/21/2018 7:12 PM, Henning Hraban Ramm wrote:
Hi Wolfgang,
thank you so much!
If we put the externalfigure setup in front, we can also calculate the spine
width:
\getfiguredimensions[MAG]
\definemeasure [SpineWidth] [\dimexpr0.01mm * (\noffigurepages/2) + 0.5mm\relax]
Where 0.01mm
Hi Wolfgang,
thank you so much!
If we put the externalfigure setup in front, we can also calculate the spine
width:
\getfiguredimensions[MAG]
\definemeasure [SpineWidth] [\dimexpr0.01mm * (\noffigurepages/2) + 0.5mm\relax]
Where 0.01mm is the paper thickness (100 g/m2) and 0.5mm
ables
command.
Wolfgang
%%
\definemeasure [SpineWidth] [6mm]
\definemeasure [SpineOffset] [\dimexpr(\measure{SpineWidth}-9pt)/5\relax]
\definepapersize
[Cover]
[width=\dimexpr420mm+\measure{SpineWidth}\relax,
height=297mm]
\setuppapersize [Cover]
\setupexternalfigures [directory={_pdf}
etween the columns.
\enableregime[utf-8]
\mainlanguage[fr]
\setupcolors[state=start]
% \unexpanded\def\ColumnsRule
% {\bgroup
%\hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax
%\color[red]{\vrule width\linewidth}%
%\hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax
%\egroup}
\definem
\definemeasure[interview][3em]
\define[1]\InterviewHeadCommand
{\offset[x=-\measure{interview}]{#1}}
\definedescription
[interview]
[alternative=top,
headcommand=\InterviewHeadCommand,
margin=\measure{interview}]
\showframe[text][text]
\starttext
\startinterview{Weisman}
\input
On Sun, 19 Mar 2017 18:18:48 +0100
Wolfgang Schuster <schuster.wolfg...@gmail.com> wrote:
> > Is it possible to calculate with \measure or do I have to resort to
> > dimens? Example:
> >
> > \definemeasure [mymeasure] [4cm]
> > \newdimen\mydim \mydim4cm
>
Marco Patzer <mailto:li...@homerow.info>
19. März 2017 um 18:06via Postbox
<https://www.postbox-inc.com/?utm_source=email_medium=sumlink_campaign=reach>
Hi!
Is it possible to calculate with \measure or do I have to resort to
dimens? Example:
\definemeasure [mymeasure] [4cm]
\ne
Hi!
Is it possible to calculate with \measure or do I have to resort to
dimens? Example:
\definemeasure [mymeasure] [4cm]
\newdimen\mydim \mydim4cm
\starttext
\framed[width=4cm]{Foobar}
\framed[width=\measure{mymeasure}]{Foobar}
\framed[width=2\mydim]{Foobar}
\framed[width=2\measure
Hi, finally coming back to this project.
Am 2015-05-11 um 17:53 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:
\definemeasure[Bleed][3mm]
\definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
You don’t have to use \dimexpr because the measure macros already us
Am 06.05.2015 um 07:06 schrieb Henning Hraban Ramm te...@fiee.net:
[…]
\definemeasure[Bleed][3mm]
\definemeasure[maxWidth][\dimexpr \paperwidth + \measure{Bleed}\relax]
\definemeasure[maxHeight][\dimexpr \paperheight + 2\measure{Bleed}\relax]
\definemeasure[topOffset][\dimexpr \topspace
Am 2015-05-05 um 02:59 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:
\def\bleed{3mm}
\def\maxWidth{\dimexpr(\paperwidth+\bleed)}
Use \definemeasure and \measure to set your own dimensions.
It is also bad style to redefine the \bleed command.
Ok, forgot about that.
Can you make
the details manual [1] answer your questions?
[1] http://pragma-ade.com/show-man-27.htm
Thank you, that helped, but not enough.
I have now:
\def\bleed{3mm}
\def\maxWidth{\dimexpr(\paperwidth+\bleed)}
Use \definemeasure and \measure to set your own dimensions.
It is also bad style
=start]
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
[ left=\measure{CAindent},
right=\measure{CAindent},
middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]
\defineenumeration[Step][headstyle=slanted
On 10 Jan 2015, at 13:53, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:
Am 10.01.2015 um 13:36 schrieb Gerben Wierda gerben.wie...@rna.nl:
I have the following setup (in mkii)
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
[ left
Am 10.01.2015 um 13:36 schrieb Gerben Wierda gerben.wie...@rna.nl:
I have the following setup (in mkii)
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
[ left=\measure{CAindent},
right=\measure{CAindent},
middle=\measure{CAindent
have the following setup (in mkii)
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
[ left=\measure{CAindent},
right=\measure{CAindent},
middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent}]
\starttext
\input knuth
I have the following setup (in mkii)
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
[ left=\measure{CAindent},
right=\measure{CAindent},
middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent}]
\starttext
\input knuth
\startitemize
=hanging,width=fit]
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\starttext
\input knuth
\par
\input knuth
\par
\startMember{Foo Foo Foo} \indenting[yes] \input knuth
\par \input knuth
\stopMember
\stoptext
\indenting[yes] after \startMember does the trick
Wierda gerben.wie...@rna.nl:
Better still. I found the solution:
\definedescription[Member][headstyle=bold,
location=hanging,width=fit]
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\starttext
\input knuth
\par
\input knuth
\par
\startMember{Foo Foo Foo
Better still. I found the solution:
\definedescription[Member][headstyle=bold,
location=hanging,width=fit]
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\starttext
\input knuth
\par
\input knuth
\par
\startMember{Foo Foo Foo} \indenting[yes] \input knuth
\par
Am 21.09.2014 um 20:32 schrieb Gerben Wierda gerben.wie...@rna.nl:
Better still. I found the solution:
\definedescription[Member][headstyle=bold,
location=hanging,width=fit]
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\starttext
\input knuth
\par
and
right margins.
A good method to set a global value for all environments is to set the
dimension with the
\definemeasure command and access it with the \measure command.
% engine=pdftex
\definemeasure[myindent][12pt]
\setupindenting[yes,\measure{myindent}]
\setupnarrower
[ left=\measure
[alternative=doublesided]
\setuplayout[backspace=4cm,width=12cm]
\definemeasure[Widetext][\textwidth+\rightmargindistance+\rightmarginwidth]
\define\WideFloatCommand
{\dowithnextbox
{\signalrightpage
\ifdim\nextboxwd\textwidth
\doifrightpageelse{\leftaligned{\flushnextbox
to the width of the text are,
when the figure is wider then the available space use the \leftaligned
or \rightaligned commands
to let the content protrude to the outer margins.
\setuppagenumbering[alternative=doublesided]
\setuplayout[backspace=4cm,width=12cm]
\definemeasure[Widefigure][\textwidth
are,
when the figure is wider then the available space use the \leftaligned
or \rightaligned commands
to let the content protrude to the outer margins.
\setuppagenumbering[alternative=doublesided]
\setuplayout[backspace=4cm,width=12cm]
\definemeasure[Widefigure][\textwidth+\rightmargindistance
and compare the width
to the width of the text are,
when the figure is wider then the available space use the \leftaligned
or \rightaligned commands
to let the content protrude to the outer margins.
\setuppagenumbering[alternative=doublesided]
\setuplayout[backspace=4cm,width=12cm]
\definemeasure
are,
when the figure is wider then the available space use the \leftaligned or
\rightaligned commands
to let the content protrude to the outer margins.
\setuppagenumbering[alternative=doublesided]
\setuplayout[backspace=4cm,width=12cm]
\definemeasure[Widefigure][\textwidth+\rightmargindistance
the figure is wider then the available space use the \leftaligned or
\rightaligned commands
to let the content protrude to the outer margins.
\setuppagenumbering[alternative=doublesided]
\setuplayout[backspace=4cm,width=12cm]
\definemeasure[Widefigure][\textwidth+\rightmargindistance
={}
manually, but it doesn't work.
May it be even possible to let Context automatically determine if the
float is to be turned right or left, depending on its page?
By the way, is \definemeasure meant as a replacement for \newdimen and
\dimexpr? Are there caveats about switching to it?
Thanks and kind
commands?
Use the \definemeasure command to set the value and the \measure command to
access it.
\definemeasure[Ssize][18pt]
\definefont[MyFont][Serif at \measure{Ssize}]
\starttext
\MyFont
\input knuth
\stoptext
Wolfgang
]
\defineoverlay
[thumbs]
[\setups{thumbs}]
\def\NOfChapters{4} % i need to make this one available
\startsetups thumbs
\definemeasure[thumbheight][\dimexpr\paperheight/\NOfChapters\relax]
\vbox to \paperheight \bgroup
\vskip \rawsectionnumber{section-2}
\measure{thumbheight
? ...
\setvariables[fontsize][smallsize=0.7\getvariable{fontsize}{bigsize}]
(size - bigsize)
but then the next hurdle is that you get 0.717pt so you need
\setvariables[fontsize][smallsize=\the\dimexpr0.7\dimexpr\getvariable{fontsize}{bigsize}\relax\relax]
which is why the next is better:
\definemeasure
which is why the next is better:
\definemeasure[fontsize:big] [17pt]
\definemeasure[fontsize:small][0.7\measured{fontsize:big}]
\definefont[big] [name:arial at \measure{fontsize:big}]
\definefont[small][name:arial at \measure{fontsize:small}]
\starttext
\big Dies ist ein großer Text
\definemeasure[h1][1.2\measured{w1}+26mm]
\definemeasure[h2][1.2\measured{w2}+26mm]
\measured gives me this error (*Undefined control sequence*):
*\17h1 ^^@-1.2\measured*
* {w1}+26mm*
*\measure ...sname \csname \??measure #1\endcsname
On 11/19/2013 11:20 AM, Géry Ogam wrote:
\definemeasure[h1][1.2\measured{w1}+26mm]
\definemeasure[h2][1.2\measured{w2}+26mm]
then use
\dimexpr\measure{w2}\relax
\measured gives me this error (/Undefined control sequence/):
old context
Hans
:
\definemeasure[w1][0.7500\paperwidth]
\definemeasure[w2][0.6667\paperwidth]
\definemeasure[h1][1.2\measured{w1}+26mm]
\definemeasure[h2][1.2\measured{w2}+26mm]
\setuplayout
[width=\measure{w1},
height=\measure{h1}]
\definelayout
[luxury]
[width=\measure{w2},
height=\measure{h2
Hi all,
I want to set the font size by using the dimension variable, but it doesn't
work. What am I doing wrong?
\definemeasure[AAA][20pt]
\newdimen\BBB \BBB=20pt
\starttext
TEXT
% don't work
\switchtobodyfont[\measure{AAA}]
AAA
% don't work
\switchtobodyfont[\the\BBB]
BBB
% ok
···date: 2013-08-04, Sunday···from: Dmitriy Tokarev···
Hi all,
I want to set the font size by using the dimension variable, but it doesn't
work. What am I doing wrong?
\definemeasure[AAA][20pt]
\newdimen\BBB \BBB=20pt
\starttext
TEXT
% don't work
\switchtobodyfont[\measure{AAA
···date: 2013-08-04, Sunday···from: Philipp Gesang···
···date: 2013-08-04, Sunday···from: Dmitriy Tokarev···
Hi all,
I want to set the font size by using the dimension variable, but it doesn't
work. What am I doing wrong?
\definemeasure[AAA][20pt]
\newdimen\BBB \BBB=20pt
:
\definemeasure[AAA][20.123pt]
\newdimen\BBB \BBB=25.127pt
\starttext
TEXT
% ok
\normalizebodyfontsize\normalizedAAA{\measure{AAA}}
\switchtobodyfont[\normalizedAAA]
AAA \normalizedAAA
% ok
\normalizebodyfontsize\normalizedBBB\BBB
\switchtobodyfont[\normalizedBBB]
BBB \normalizedBBB
\stoptext
method to get these values.
%% MWE
\definemeasure[ColumnA][10mm]
\def\ColumnB{20mm}
%
not a general solution
%%%
\def\ColumnB{20mm}
\newtoks\MyColumnB \MyColumnB{20mm}
\starttext
\startluacode
local c = \\csname ColumnB\\endcsname
context(ColumnB=%s,c)
\stopluacode
\par
\toks0=\expandafter
(\ColumnA + \ColumnB)}
\defineexpandable\ColumnABii {\ctxlua{context(\ColumnA + \ColumnB)}}
\newdimen\ColumnABiii \ColumnABiii = \dimexpr(\ColumnA + \ColumnB)
\definemeasure[ColumnA][30mm]
\definemeasure[ColumnB][40mm]
\definemeasure[ColumnBi][\the\dimexpr(\measure{ColumnA}+\measure{ColumnB
}
\defineexpandable\ColumnABi{\dimexpr(\ColumnA + \ColumnB)}
\defineexpandable\ColumnABii {\ctxlua{context(\ColumnA + \ColumnB)}}
\newdimen\ColumnABiii \ColumnABiii = \dimexpr(\ColumnA + \ColumnB)
\definemeasure[ColumnA][30mm]
\definemeasure[ColumnB][40mm]
\definemeasure[ColumnBi][\the\dimexpr(\measure
1 - 100 of 142 matches
Mail list logo