[NTG-context] build_parshape and \getshapetext - need for a deeper understanding

2024-05-19 Thread garulfo
] %-- \usecolors[svg] \definemeasure [mywidth] [7cm] \definemeasure [mywidtha] [5cm] \definemeasure [myheight] [{\the\dimexpr\baselineskip*37+\lineskip\relax}] \definemeasure [myheighta][{\the\dimexpr\baselineskip*18+\lineskip*1\relax}] \definemeasure

Re: [NTG-context] right and left arrowfill

2023-06-23 Thread Carlos via ntg-context
h of TeX is magick but what is bad about > that? > > > \hbox to 1in{\vrule \rightarrowfill \ 1in \leftarrowfill\vrule} > > > > or > > > > \hbox to 1cm{\vrule \rightarrowfill \ 1cm \leftarrowfill\vrule} > > > > which gives an accurate description, not to men

Re: [NTG-context] right and left arrowfill

2023-06-23 Thread Hans Hagen via ntg-context
is the same as in plain tex is wrong. (1) one can define an arrow fill using a leader that uses some (happen to be present in tex math fonts) glyphs: repeated minuses followed by some magic kern and an arrow head. (2) You can hope that the magick kern is right and that the minus aligns with the arrows

Re: [NTG-context] new units

2023-05-06 Thread Alan Braslau via ntg-context
is the most boring part. > > \starttext > > \startTEXpage[offset=1ts] > Hello World! > > \the\dimexpr 1ts > > \the\dimexpr 1es > > \the\dimexpr 1eu > > \eufactor20 > > \the\dimexpr 1eu > \stopTEXpage > > \stoptext >

[NTG-context] new units

2023-05-04 Thread Hans Hagen via ntg-context
article in TB will explain the details of the process and also a careful mathematical annalysis of how we reached the right value with a high precission. The actual implementation is the most boring part. \starttext \startTEXpage[offset=1ts] Hello World! \the\dimexpr 1ts \the\dimexpr

[NTG-context] TIL: figure combinations

2022-08-11 Thread Henning Hraban Ramm via ntg-context
You probably know about combinations to place images side by side: \startcombination[3*1] {\externalfigure[cow]}{cow} {\externalfigure[mill]}{mill} {\externalfigure[hacker]}{hacker} \stopcombination Now, the widths aren’t calculated automatically. You could define them on your own

Re: [NTG-context] placing (on) layers

2022-04-16 Thread Pablo Rodriguez via ntg-context
On 4/15/22 21:51, Henning Hraban Ramm via ntg-context wrote: > Hi again, > > I’m always struggling with putting stuff on layers, since these just > never start where I’d expect them to, and the offsets changed a few > times within the last years. > > Please explain how I

Re: [NTG-context] placing (on) layers

2022-04-16 Thread Henning Hraban Ramm via ntg-context
with putting stuff on layers, since these just never start where I’d expect them to, and the offsets changed a few times within the last years. Please explain how I should define a layer that covers the whole page, since the following MWE is wrong (the layer always starts below the first line

Re: [NTG-context] placing (on) layers

2022-04-16 Thread Willi Egger via ntg-context
ng stuff on layers, since these just never > start where I’d expect them to, and the offsets changed a few times within > the last years. > > Please explain how I should define a layer that covers the whole page, since > the following MWE is wrong (the layer always starts below the f

[NTG-context] placing (on) layers

2022-04-15 Thread Henning Hraban Ramm via ntg-context
Hi again, I’m always struggling with putting stuff on layers, since these just never start where I’d expect them to, and the offsets changed a few times within the last years. Please explain how I should define a layer that covers the whole page, since the following MWE is wrong (the layer

Re: [NTG-context] Table of Contents Header?

2021-12-30 Thread kauśika via ntg-context
TOCpar] [3] [width=\dimexpr\TOCPageLabelWidth, align=middle] Finally, wrap it all up in the macro \define[3]\TOCEntry{% \startTOC #1 \TOCpar #2 \TOCpar #3% \stopTOC% } and indicate the command to use in the setup \setuplist [c

Re: [NTG-context] startlines with long lines that break and indent

2021-12-26 Thread Rik Kabel via ntg-context
based on the following, which I made it following suggestions from others. There may well be other ways, but this works for me. \define\Poemindent{3em} \define\Poeminset{14em} \definedelimitedtext[Poe] \setupwhitespace[medium] \showframe \startbuffer[Poem]   This is a long

[NTG-context] space between chapter and chapter number (in words)

2020-10-14 Thread jbf
nothing to solve the problem: \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 2.5cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-2.5cm\relax    \doifsomething{\rawstructurelistuservariable{year

[NTG-context] correct vertical alignment in ToC

2020-09-29 Thread jbf
the definition below) and section authors (given its definition below), I could solve this problem, but everything I have tried does not seem to work. Wolfgang had given me the ChapterListCommand definition, and I think Hraban the SectionTocentry: (1) CHAPTERLISTCOMMAND \define[3]\ChapterListCommand

Re: [NTG-context] styling individual parts of ToC entry

2020-09-09 Thread jbf
e will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax    \doifsomething{\rawstructurelistuservariable{year}} {{\it\struc

[NTG-context] Fwd: Re: styling individual parts of ToC entry

2020-09-07 Thread jbf
\structurelistuservariable{author}}}%    \hfill\currentlistentrypagenumber % pagenumber \egroup    \egroup}    \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax

Re: [NTG-context] styling individual parts of ToC entry

2020-09-07 Thread Wolfgang Schuster
ons' with authors I need for Chapter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread jbf
ter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgr

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread Wolfgang Schuster
to the \ChapterListCommand do I need to make to accommodate the following? Possibly an \else statement, but not sure how to include that: \startchapter [title={Chapter title}] [author={Author Name}] I forgot to change the argument for the check off the author entry, this should fix it. \define[3

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread jbf
regarding the two questions above - not yet, anyway. If someone knows where, please point me to it. \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax    \doifsomething

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread Wolfgang Schuster
: % \define[1]\TitleTocEntry{%   #1\hskip 1cm% title    \structurelistuservariable{author}%   } \setuplist[title][textstyle=bold,   textcommand=\TitleTocEntry, ] %--- /Question 1:/ /How to get the two author names to line up vertically./ Given that I have both

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, % width=\ColWidth, ]{% \vtop{\placelocalnotes[footnote][before=,after

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
arginNote#1{% > \inmargin[ > voffset=\dimexpr-\FNVOffset\lineheight\relax, > width=\ColWidth, > align=flushleft, > ]{% > \inframed[ >width=\ColWidth, >align=right, >frame=off, >offset=overlay, >strut=yes, >]{#1}% > }% > } >

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Henning Hraban Ramm
relax, width=\ColWidth, align=flushleft, ]{% \inframed[ width=\ColWidth, align=right, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, width=\ColWidth, ]{% \vtop{\placelocalnotes

Re: [NTG-context] lmtx update

2020-08-01 Thread Otared Kavian
\else \unvbox\MyNoteOverflow \fi \placenotes[endnote][before=,after=] \egroup \scratchdimen\dimexpr\textheight-.5\lineheight\relax \ifdim\ht\scratchbox>\scratchdimen \global\setbox\My

Re: [NTG-context] Getting width of text to be typeset

2020-05-22 Thread Rik Kabel
uot;inject" TeX workflow or whether to access LuaTeX internals (nodes?) to get the desired information. - Is it possible somehow? Too easy ... \startluacode function document.whatever() context(nodes.hpack(tex.getnest().head.next).width) end \stopluacode \unex

Re: [NTG-context] Custom list layout with PDF bookmarks

2020-05-16 Thread Henning Hraban Ramm
I need to create my own links somehow? >> >> Example: >> >> \setupinteraction[state=start] >> \setupinteractionscreen[option=bookmark] >> >> \define[3]\SectionListEntry >> {\par \leftaligned\bgroup >> \hbox to 2em{#3}% >>

Re: [NTG-context] Custom list layout with PDF bookmarks

2020-05-16 Thread Wolfgang Schuster
[option=bookmark] \define[3]\SectionListEntry {\par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par} % Comment out this next line to regain section hyperlinks in the ToC \setuplist[section][alternative

Re: [NTG-context] Custom list layout with PDF bookmarks

2020-05-16 Thread Henning Hraban Ramm
etupinteraction[state=start] > \setupinteractionscreen[option=bookmark] > > \define[3]\SectionListEntry > {\par \leftaligned\bgroup > \hbox to 2em{#3}% > \hskip 1em > \vtop{\hsize\dimexpr\textwidth-3em\relax#2} > \egroup \par} > > % Comment o

[NTG-context] Custom list layout with PDF bookmarks

2020-05-15 Thread Bruce Horrocks
When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow? Example: \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \define[3]\SectionListEntry

Re: [NTG-context] Shift tabulate into margin and center

2020-05-05 Thread Tim Steenvoorden
r=0pc, > height=49pc, > footer=0pc, > bottomdistance=2.5pc, > bottom=1pc, > location=middle] > > \define\fullwidth{\dimexpr(\leftmargindistance+\leftmarginwidth+\textwidth)} > > \section{First} > \subsection{First first} > > \input tufte > > \setupnarrower[left=

[NTG-context] Shift tabulate into margin and center

2020-05-04 Thread Tim Steenvoorden
=middle] \define\fullwidth{\dimexpr(\leftmargindistance+\leftmarginwidth+\textwidth)} \section{First} \subsection{First first} \input tufte \setupnarrower[left=-9pc] \startnarrower[left] \startframedtext[frame=off,topframe=on,bottomframe=on,align=middle,width=\fullwidth] The whole frame should

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Rik Kabel
, but maybe nowadays one could also right a more readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Hans Hagen
progress. For the record, below is a transcript of what I adapted from Wolfgang's solution, but maybe nowadays one could also right a more readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Otared Kavian
readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax

Re: [NTG-context] notes in the margin

2019-10-04 Thread Henning Hraban Ramm
, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, width=\ColWidth, ]{% \vtop{\switchtobodyfont[6pt]\placelocalnotes[footnote][before=,after=]}}% } \def\FNo#1{{#1~}} %\crlf\gobblespacetokens

Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-29 Thread Martin Althoff
Hi Hraban, I can't answer your question counter or \define. However in my specific situation I would not use the number as a counter but just as a value. Actually my situation is an exam in which the total points are 44. From these I want to calculate percentages. And, as I find it easier

Re: [NTG-context] defs, variables and dimensions

2019-09-28 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 28.09.2019 um 08:53: Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster : \define\question{44} \defineexpandable\question{44} Would it make sense to use a counter or some other TeX construct? Is it better to use \setvariable(s) for simple values than any \def

Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-28 Thread Henning Hraban Ramm
> Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster > : > >> \define\question{44} > \defineexpandable\question{44} Would it make sense to use a counter or some other TeX construct? Is it better to use \setvariable(s) for simple values than any \def? Should I use a \newdime

Re: [NTG-context] expansion problem: random location

2019-09-13 Thread Wolfgang Schuster
=.4\textwidth} \startplacefigure[location={#1},title={#1 \fakewords{3}{20}}] \externalfigure[place #1][width=\PicWidth,height=\dimexpr\textheight * \imgH / 10 \relax] \stopplacefigure } Put the value of the random location in a macro. \define[1]\Blindbild   {\edef\PicLocation{#1

[NTG-context] expansion problem: random location

2019-09-13 Thread Henning Hraban Ramm
() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth=.4\textwidth} \startplacefigure[location={#1},title={#1

Re: [NTG-context] background color, was: CMYK Color profile

2019-06-02 Thread Benjamin Koppe
nepageshift > [flyer] > [horizontal] > [\dimexpr\measure{bleed}-\measured{shortfold}\relax, > \measure{bleed}, > \measure{bleed}, > \dimexpr2\measured{shortfold}+\measured{bleed}\relax, > \measure{bleed}, > \dimexpr\measure{bleed}-\measured{s

Re: [NTG-context] background color, was: CMYK Color profile

2019-05-31 Thread Benjamin Koppe
. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax, \measure{bleed}, \measure{bleed}, \dimexpr2\measured{shortfold}+\measured{bleed}\relax, \measure{bleed}, \dimexpr\measure{bleed}-\measured{shortfold}\relax

[NTG-context] DIN lang folder with crop marks

2019-04-10 Thread Benjamin Koppe
. \setuparranging [TRYPTICHON] %% Because of the shorter folded page and the bleed the pages has %% to be shifted horizontally on the printed sheet. %% The values are calculated here. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax

Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Jeong Dal
Dear Hans, Thanks for the solution. It works perfectly. Best regards, Dalyoung >> define[1]\iCol > {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]} > ___ If your question is of intere

Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Hans Hagen
way to define them in one definition? It may be my greedy hope. \define[1]\iCol {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]} - Hans Hagen | PRAGMA ADE

Re: [NTG-context] notes in the margin

2018-02-12 Thread Henning Hraban Ramm
v) I just need a way to transfer this option through \footnote: I used a global definition that I redefine where I need it: \def\FNVOffset{0} % vertical shift of footnotes in negative lines % this is unclean, but works quite well \define\PlaceFootnote% {\inmargin[voffset=\dimexpr-\FNVOffset\

Re: [NTG-context] Disable overlay on chapter pages

2017-08-04 Thread Mikael P. Sundqvist
ound] [\directsetup{pagebackground}] \setupbackgrounds [page] [background=pagebackground] \startsetups pagebackground \doifelsemode {chapterpage} { \setlayer [chapter] [x=\dimexpr\backspace+\textwidth+\rightmargindistance\relax, y=3in, loca

Re: [NTG-context] itemize columns transposed

2016-10-11 Thread Mikael P. Sundqvist
t; \startitem Fourth \stopitem > \stopitemize > > \stoptext > > > or add a invisible symbol with increased height/depth at the begin of each > item, e.g. > > \define\HorizontalItem > {\phantombox[height=\strutht,depth=\dimexpr\strutdp+\lineheight\relax]} > >

Re: [NTG-context] itemize columns transposed

2016-10-11 Thread Wolfgang Schuster
orizontal][inner={\setupinterlinespace[line=6ex]}] \startitem First \stopitem \startitem Second \stopitem \startitem Third \stopitem \startitem Fourth \stopitem \stopitemize \stoptext or add a invisible symbol with increased height/depth at the begin of each item, e.g. \define\HorizontalIte

Re: [NTG-context] \vfill shifts content off grid

2016-09-04 Thread Wolfgang Schuster
ou can determine how much space is left on the page and with the \getnoflines command you get the number of lines for the free space. begin example \define\MoveToBottom {\par \dowithnextbox {\scratchdimen\dimexpr\pagegoal-\pagetotal-\nextboxht-\lineheight\relax \getno

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-26 Thread Hans Hagen
- case (2) I am afraid I hasn't been clear enough yet. Can I somehow define command globally which takes local block widths? \parfillskip #1 plus \localhsize-#1-#2, where #1 gap width #2 shortest line width \availablehsize So the following \parfillskip specification finally seems to be what I

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Jan Tosovsky
mem > > emememememem > > > > So there are two last line lengths extrems: > > (shortest) > > emememememememememememememememememememem > > emememememem > > > > (longest) > > emememememememememememememememememememem > &g

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Hans Hagen
] \edef\ward{\cldloadfile{ward}} \setupalign[verystrict,hz] \starttext \dorecurse{100}{ \hsize\dimexpr\textwidth-#1mm\relax \dimen0=\hsize \advance\dimen0 by -8em % 3*em - 2em \parfillskip 2em plus \dimen0\relax \ward \par \parfillskip 2em plus \dimen0\relax

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Hans Hagen
\dimexpr\textwidth-#1mm\relax \dimen0=\hsize \advance\dimen0 by -8em % 3*em - 2em \parfillskip 2em plus \dimen0\relax \ward \par \parfillskip 2em plus \dimen0\relax \ward \par \startnarrower[left] \parfillskip 2em plus \dimen0\relax \ward

Re: [NTG-context] Length range control of the last line of paragraph

2016-03-25 Thread Jan Tosovsky
narrow blocks, which is not my use case). \showmakeup[glue] \setupindenting[yes,2em] \edef\ward{\cldloadfile{ward}} \setupalign[verystrict,hz] \starttext \dorecurse{100}{ \hsize\dimexpr\textwidth-#1mm\relax \dimen0=\hsize \advance\dimen0 by -8em % 3*em - 2em \parfillskip

Re: [NTG-context] Vertically centered text in each page

2016-03-02 Thread Andreas Schneider
header] [width=\paperwidth, height=\paperheight] \define[2]\setheader{% \resetlayer[header]% \setlayer[header]% [preset=lefttop, x=10mm, y=5mm, width=15cm, heigth=40pt]% {#2}% } \define[2]\setsubtitle{% \setlayer[header]% [preset=lefttop, x=10mm, y=\dimexpr(5mm+40pt), width=15cm,

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-11 Thread Fabrice Couvreur
...@gmail.com 10. August 2015 09:13 Dear Hans, I tested without understanding what \unexpanded, and of course it works ! You can use ConTeXt’s \define command where you don’t have to think about \unexpanded etc., e.g. \define[2]\ChapterCommand {\setbox\scratchbox\hbox to \leftmarginwidth{#1

[NTG-context] Strange behavior (TikZ)

2015-08-11 Thread Fabrice Couvreur
currentpicture to p ; \stopuniqueMPgraphic \defineoverlay[titled][\uniqueMPgraphic{titled}] \define[2]\ChapterCommand {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}% \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax \framed [background=titled,frame=off,offset=0pt] {\box

Re: [NTG-context] Command that does not give the expected result (Metafun)

2015-08-10 Thread Wolfgang Schuster
Fabrice Couvreur mailto:fabrice1.couvr...@gmail.com 10. August 2015 09:13 Dear Hans, I tested without understanding what \unexpanded, and of course it works! You can use ConTeXt’s \define command where you don’t have to think about \unexpanded etc., e.g. \define[2]\ChapterCommand {\setbox

Re: [NTG-context] User-Defined Commands With Key-Value Options

2015-07-23 Thread Rik
.) is stored somewhere when the compilation process reads, say, \startbiblebook, and that they are available to define the the formatting done by \startbiblebook. Thank you. I have found this wiki: http://wiki.contextgarden.net/Commands_with_KeyVal_arguments But since I do not know Lua, I

[NTG-context] Changing font for math function

2015-05-13 Thread Maggyero
=\dimexpr 0.3\textwidth\relax] \setupparagraphs[myparagraphs][3][width=\dimexpr 0.3\textwidth\relax] \section{{\tt \backslash setupmathematics[functionstyle=\backslash rm\backslash tf,textstyle=\backslash rm\backslash tf]} (default setup)} \define\mathfunctionstyle{\rm\tf} \define\mathtextstyle{\rm

Re: [NTG-context] Changing font for math function

2015-05-12 Thread Hans Hagen
]. About \mathupright: it is just a wrapper for \rm\tf. Better use \text{\rm\tf} or equivalently \mathop{\mathlabel{}} with \setupmathematics[mathlabelstyle=\rm\tf]. Here is a little example showing the behaviour of the new command \mathlabel defined above: \define\mathlabelstyle{\tf} % I don't have

[NTG-context] Changing font for math function

2015-05-12 Thread Maggyero
above: \define\mathlabelstyle{\tf} % I don't have access to the last beta yet so let's assume that the key 'mathlabelstyle' (called by Hans 'functionstyle' so far) of \setupmathematics is implemented this way, with the default value \tf (Aditya prefers \rm\tf as the default value so it is just

[NTG-context] Caption location with vertical \startplacefigure

2015-04-16 Thread Rik Kabel
and earlier versions, so it does not appear to be a regression.) \showframe \setuppapersize[A4][A3,landscape] \useMPlibrary[dum] %% Enable the first set of three for wider picture margins, %% and the second set of three for standard picture margins \def\FullWidth{\the\dimexpr

Re: [NTG-context] Bug with custom TOC

2014-11-08 Thread Wolfgang Schuster
Am 07.11.2014 um 15:04 schrieb Michał Goliński golin...@amu.edu.pl: The following example is taken from the wiki (http://wiki.contextgarden.net/Command/setuplist): \define[3]\SectionToCEntry{ \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth

[NTG-context] Bug with custom TOC

2014-11-07 Thread Michał Goliński
The following example is taken from the wiki (http://wiki.contextgarden.net/Command/setuplist): \define[3]\SectionToCEntry{ \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2}% \egroup } \setuplist [part] [alternative=interactive

Re: [NTG-context] How to make floats extend into the outer margin

2014-07-24 Thread Joshua Krämer
={} 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

Re: [NTG-context] Margin heading problem, was Re: sections

2014-06-05 Thread Rik Kabel
? no, unrelated, try this: \setuphead [section] [after={\strut\blank[-2*line,samepage,disable]}, command=\SectionCommand, distance=0pt] \define[2]\SectionCommand{\inleft{XX}} That was fine until it ran into \setupwhitespace with a non-zero value. Fiddling with the after key \blank

Re: [NTG-context] Margin heading problem, was Re: sections

2014-06-02 Thread Rik Kabel
[section] [after={\strut\blank[-2*line,samepage,disable]}, command=\SectionCommand, distance=0pt] \define[2]\SectionCommand{\inleft{XX}} That was fine until it ran into \setupwhitespace with a non-zero value. Fiddling with the after key \blank does not appear to help. \define

Re: [NTG-context] Bugs in linenumbering ?

2014-04-03 Thread Stéphane Goujet
[narcite][left=\repshift,before=,after=] \define\startbloccite{\startnarcite[left]\setupindenting[first,yes,\dimexpr\parindent-\repshift]\startlinenumbering[repcite]«} \define\startbloccitel{\startnarcite[left]\setupindenting[first,yes,\dimexpr\parindent-\repshift]\startlinenumbering[repcitel]«} \define

[NTG-context] Feature Request: ToC page number alternative

2014-02-26 Thread Thangalin
,] \setupcombinedlist[content][interaction=all,] \unprotect \define[3]\SectionToCEntry{% \hbox \strc_lists_get_reference_attribute\v!all{% \par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par% } } \protect

Re: [NTG-context] Feature Request: ToC page number alternative

2014-02-26 Thread Wolfgang Schuster
title would be useful. \unprotect \define[3]\SectionToCEntry{% \hbox \strc_lists_get_reference_attribute\v!all{% \par \leftaligned\bgroup \hbox to 2em{#3}% \hskip 1em \vtop{\hsize\dimexpr\textwidth-3em\relax#2} \egroup \par% } } \protect \setuplist

Re: [NTG-context] Rearrange Table of Contents section page numbers

2014-02-01 Thread Wolfgang Schuster
[title=beta] \stopchapter \startsection[title=alphasec] \stopsection \startchapter [title=gamma] \stopchapter \startsection[title=alphasec] \stopsection \stoptext How do you determine whether or not the chapter title should be displayed? \define[3]\SectionListEntry {\par

[NTG-context] Need help defining command.

2013-10-22 Thread Keith J. Schultz
HI All, I remember seeing some seeing what I want to do but I can not find it. I would like to define a command that takes an optional key-valued list and 1 or 2 manditory ones. Something like \unexanded\def\MyCommand[#1]#2% {% \NassiGroupFrame[#1]{#2}% }% or \unexanded\def\MyCommand[#1]#2

Re: [NTG-context] bug? gap appears in columnset

2013-09-17 Thread Hans Hagen
On 9/17/2013 8:57 PM, Lars Huttar wrote: Can you point me to documentation on the constraints that define what kind of interlinespace is sane? the default is 2.8ex which is pretty safe, then there is the ht/dp ratio which in some cases has to be adapted to fonts esp when they are non

[NTG-context] Module simpleslides error

2013-09-13 Thread Xan
-BottomSquares.tex: Undefined control sequence ... 58 % top=\vss,bottom=\vss] 59 60 61 %D We define our color scheme: 62 63 \definecolor [simpleslides:backgroundcolor][s=.95] 64 \definecolor [simpleslides:contrastcolor] [r=.7,g=.1,b=.3] 65

[NTG-context] Consistent Colors

2013-01-29 Thread Devendra Ghate
] % A macro that generates three shades above and below the given color. % It is assumed here that the RGB values are also passed along with % the color name. \define[4]\generateColorGroup{ \definecolorgroup [#1] [#2:#3:#4] %\dimexpr#2/4:#3/4:#4/4] }% \generateColorGroup{maroon}{0.8}{0.2

Re: [NTG-context] Consistent Colors

2013-01-29 Thread Devendra Ghate
:0.2:0.4, %0.4:0.1:0.2, %0.2:0.05:0.1] % A macro that generates three shades above and below the given color. % It is assumed here that the RGB values are also passed along with % the color name. \define[4]\generateColorGroup{ \definecolorgroup [#1] [#2:#3:#4] %\dimexpr#2/4:#3

[NTG-context] Too large value of \definecolumnsethsize

2012-07-24 Thread Marco
error? If the figure width is slightly decreased (see the commented part), the first page looks as intended. But that's exactly what the command \definecolumnsethsize is for -- to get the correct size. Another workaround is to define the column width, so it is a know value. The behaviour

Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm
can’t get layers working within postponing. And when that works, I need to wrap it in a macro, since I alway need to define and postpone three sequential pages. Without postponing, this works: --- *** --- \setuppagenumbering[alternative=doublesided] \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr

Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 2:00 PM, Henning Hraban Ramm hra...@fiee.net wrote: Sorry for coming back again and again, but I’m still stuck, and my deadline is overdue. * I need full-page pictures on defined pages in the middle of a chapter. * I don’t care if I must define on page x or on the next

Re: [NTG-context] multi-page floats

2012-06-05 Thread Wolfgang Schuster
Am 05.06.2012 um 14:00 schrieb Henning Hraban Ramm: Sorry for coming back again and again, but I’m still stuck, and my deadline is overdue. * I need full-page pictures on defined pages in the middle of a chapter. * I don’t care if I must define on page x or on the next right page after

Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm
Am 2012-06-05 um 19:55 schrieb Wolfgang Schuster: Sorry for coming back again and again, but I’m still stuck, and my deadline is overdue. * I need full-page pictures on defined pages in the middle of a chapter. * I don’t care if I must define on page x or on the next right page after

Re: [NTG-context] doublesided wider paragraphs

2012-05-22 Thread Wolfgang Schuster
the example work? \usemodule[annotation] \define[2]\FullwidthCommand {\doifoddpageelse {\doadaptrightskip{-\the\dimexpr\rightmarginwidth+\rightmargindistance\relax}} {\doadaptleftskip {-\the\dimexpr\leftmarginwidth +\leftmargindistance \relax}}% #2} \defineannotation[fullwidth

Re: [NTG-context] doublesided wider paragraphs

2012-05-22 Thread Andy Thomas
\input tufte \stopfullwidth \input tufte \stoptext My questions are: Is there no more \startlocal, how to locally adjust the layout on a page and how to make the example work? \usemodule[annotation] \define[2]\FullwidthCommand {\doifoddpageelse {\doadaptrightskip{-\the\dimexpr

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Wolfgang Schuster
? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2}% \box\scratchbox}} \setuphead[chapter][command=\mychap,textstyle=\tfa,numberstyle=\tfd] \starttext

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Charles
to work while used directly. Any solution? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2}% \box\scratchbox}} \setuphead[chapter][command

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Wolfgang Schuster
size, on the right side. The \mychap seems to work while used directly. Any solution? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize\dimexpr\hsize-\wd\scratchbox\relax#2

Re: [NTG-context] Linebreak in a framed for a chapter setuphead

2012-02-29 Thread Charles
on the left side and the number, with higher size, on the right side. The \mychap seems to work while used directly. Any solution? \define[2]\mychap {\framed [frame=off,width=broad,align=flushleft,bottomframe=on,offset=0pt] {\setbox\scratchbox\hbox{#1}% \vtop{\hsize

Re: [NTG-context] Undefined controle sequence with usemodule[simpleslides]

2012-01-04 Thread Aditya Mahajan
, footerdistance=0.5cm, topspace=0.5cm, backspace=1cm, location=singlesided] %D We define some other layouts which can be used to change the layout of %D specific kinds of pages. This module defines three kinds of pages: %D horizontal, vertical, and title, and we

Re: [NTG-context] custom command \myframedsection does not always work. Bug?

2011-10-30 Thread Wolfgang Schuster
[0.5in]\startframedtext[background=color,backgroundcolor=gray:10]}, after={\stopframedtext\blank[0.25in]}, color=blue*:3] and \define[2]\MyframedsectionCommand {\framed [background=color,backgroundcolor=gray:10,align=flushleft] {\hbox to 2cm{#1}\vtop{\hsize=\dimexpr\hsize-2cm\relax

Re: [NTG-context] custom command \myframedsection does not always work. Bug?

2011-10-30 Thread Curiouslearn
] and \define[2]\MyframedsectionCommand  {\framed     [background=color,backgroundcolor=gray:10,align=flushleft]     {\hbox to 2cm{#1}\vtop{\hsize=\dimexpr\hsize-2cm\relax#2}}} \definehead[myframedsection][section] \setuphead  [myframedsection]  [before={\blank[0.5in]},   command

Re: [NTG-context] First and last lines on a grid

2011-04-23 Thread Oliver Buerschaper
This should do the trick: \define[1]\PagenumberCommand {\smash[d]{#1}} \setuppagenumbering [ strut=no, command=\PagenumberCommand] And how well it does it! Now I managed to align the last line of the grid with the textblock's frame: --- \definemeasure [gridWidth] [\dimexpr

Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Oliver Buerschaper
Not sure if there are side effects but this works (requires mkiv and a recent installation): \setuplayout[grid=yes]\showgrid \setupbodyfont[14pt] \usemodule[annotation] \define[2]\ZitatCommand {\topskip\dimexpr\topskip+\lineheight/2\relax \startnarrower “#2”% \stopnarrower

Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-12 Thread Wolfgang Schuster
installation): \setuplayout[grid=yes]\showgrid \setupbodyfont[14pt] \usemodule[annotation] \define[2]\ZitatCommand {\topskip\dimexpr\topskip+\lineheight/2\relax \startnarrower “#2”% \stopnarrower} \defineannotation [zitat] [alternative=command, command=\ZitatCommand, spacebefore

[NTG-context] Toward the use of inleft for custom secti on's command… or not…

2010-11-24 Thread Renaud AUBIN
{ \blank % just because I always need some vertical space just before my Section \inleft{\bfa #1} {\line{\leaders\hbox{\vrule width 1pt height .5\strutht depth -\dimexpr.5\strutht-\linewidth\relax} \hfil}} \blank[-1*big] % Are you kidding me with that negative blank??? } \define[4

Re: [NTG-context] Problems with TABLE

2010-09-30 Thread Peter Münster
On Thu, Sep 30 2010, Patrick Gundlach wrote: I still have some problems with TABLE: \bTABLE[frame=on] We need to know the values for rulethickness and offset, so let's define them: \bTABLE[frame=on, rulethickness=0.5pt, offset=0.1em] \bTD[frame=off,rightframe=on,rulethickness=1mm] abc

Re: [NTG-context] table: vertical distance

2010-04-17 Thread Wolfgang Werners-Lucchini
\define[1]\divisionrule {\dontleavehmode\blap {\vskip-\strutht \blackrule[width=\the\dimexpr.5em*#1\relax,height=2\linewidth]}% \vskip-\lineheight} Ahh! Yes, this helps a lot. Thank you very much! Wolfgang

Re: [NTG-context] beta

2009-04-23 Thread Lutz Haseloff
Thanks Wolfgang, but I got following error: define font | font with name hlcrim is not found math virtual | loading font lucidamath subfont 2 with name hlcrim at 458752 is skipped, not found define font | font with name hlcry is not found math virtual | loading font lucidamath subfont 3 with name

  1   2   >