[NTG-context] thinrules width
Hello list, and developers in particular, I note that thinrules (and its setup, setupthinrules, and relatives thinrule and hairline) does not have a width setting, and always sets a rule (or rules) the full width of the text area (less any text set on the same line. No problem, but I do see (non-authoratative) references in the mailing list to such a parameter, and more problematically, I note that the default ConTeXt template for Pandoc includes the line: \setupthinrules[width=15em] % width of horizontal rules Before reporting an issue to the Pandoc team, I just want to confirm that this is, in fact, both the case (as reading the source and my testing indicate) and the intent (which I cannot attest). I would further suggest that Pandoc should be using setupblackrule with appropriate height, depth, rulethickness, and width. I suspect that Pandoc typography is not sensitive to control of the actual placement relative to the baseline, as ConTeXt supports, but a pointer to a clear explanation of the interaction of height, depth, and rulethickness would be welcome. -- Rik ___ 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] Filling a page with \thinrules
Thanks Rik! The \phantom stuff is following me since the good old Plain TeX days… :-) Now I know how to get rid of it. Best regards: OK > On 7 Dec 2019, at 16:33, Rik Kabel wrote: > […] > > Replace the \hphantom{...} with \dontleavehmode. > > -- > Rik ___ 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] Filling a page with \thinrules
On 12/7/2019 04:10, Otared Kavian wrote: Hi Rik, Thanks a lot for the link to that message dating back to 2010… I tried to put that solution on the wiki but I could not create a new page. I'll try later. 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 know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax \thinrules[n=\number\scratchcounter,inbetween={\blank[2.2ex]}] \page } \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrulesfillpage \thinrulesfillpage \input ward.tex \thinrulesfillpage \stoptext On 7 Dec 2019, at 03:49, Rik Kabel wrote: On 12/6/2019 17:50, Otared Kavian wrote: Hi all, I am preparing a test for my students where I would like to have the statement of the problem on the top of a page and the remainder to the bottom of that page filled with \thinrules, for them to write the solution. And sometimes there might be an empty page filled with thinrules when the solution to the exercise is longer. The following minimal example gives the idea of what I want to achieve, but since the statement of each exercise may be longer or shorter, I would like ConTeXt to compute how many \thinrules can be put in the remainder of the page. That is, can one imagine a macro named (say) \fillpagewiththinrules which puts the exact number of thinrules before ejecting the page? Is this possible or have I to do it by hand for each page? \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrules[n=20] % On the first page I can put 20 thinrules \page \thinrules[n=40] % On an empty page I can put 40 thinrules \page \input ward.tex \thinrules[n=37] % On the third page there can be 37 thinrules \stoptext Thanks for any hint and help, Best regards: Otared K. It looks like Wolfgang answered this a while back. See Re: [NTG-context] Room for comment on the backside of form. . -- Rik Replace the \hphantom{...} with \dontleavehmode. -- Rik ___ 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] Filling a page with \thinrules
On 12/7/2019 10:10 AM, Otared Kavian wrote: Hi Rik, Thanks a lot for the link to that message dating back to 2010… I tried to put that solution on the wiki but I could not create a new page. I'll try later. Think TeX (and a little ConTeXt): \starttexdefinition thinrulesfillpage \par \verticalstrut \vskip-.5\lineheight \leaders \hbox to \hsize{\blackrule[width=\hsize,height=1pt,depth=1pt,color=red]\strut} \vfilll \verticalstrut \vskip-1.5\lineheight \page \stoptexdefinition \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrulesfillpage \thinrulesfillpage \input ward.tex \thinrulesfillpage \stoptext Now Wolfgang can change the \leaders in the proper ConTeXt interface calls. Okay, we could as well make it into some feature or course, as occasionally we need to add something new anyway, just to show 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 know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax \thinrules[n=\number\scratchcounter,inbetween={\blank[2.2ex]}] \page } \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrulesfillpage \thinrulesfillpage \input ward.tex \thinrulesfillpage \stoptext On 7 Dec 2019, at 03:49, Rik Kabel wrote: On 12/6/2019 17:50, Otared Kavian wrote: Hi all, I am preparing a test for my students where I would like to have the statement of the problem on the top of a page and the remainder to the bottom of that page filled with \thinrules, for them to write the solution. And sometimes there might be an empty page filled with thinrules when the solution to the exercise is longer. The following minimal example gives the idea of what I want to achieve, but since the statement of each exercise may be longer or shorter, I would like ConTeXt to compute how many \thinrules can be put in the remainder of the page. That is, can one imagine a macro named (say) \fillpagewiththinrules which puts the exact number of thinrules before ejecting the page? Is this possible or have I to do it by hand for each page? \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrules[n=20] % On the first page I can put 20 thinrules \page \thinrules[n=40] % On an empty page I can put 40 thinrules \page \input ward.tex \thinrules[n=37] % On the third page there can be 37 thinrules \stoptext Thanks for any hint and help, Best regards: Otared K. ___ 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 ___ It looks like Wolfgang answered this a while back. See Re: [NTG-context] Room for comment on the backside of form. . -- Rik ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.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
Re: [NTG-context] Filling a page with \thinrules
Hi Rik, Thanks a lot for the link to that message dating back to 2010… I tried to put that solution on the wiki but I could not create a new page. I'll try later. 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 know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax \thinrules[n=\number\scratchcounter,inbetween={\blank[2.2ex]}] \page } \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrulesfillpage \thinrulesfillpage \input ward.tex \thinrulesfillpage \stoptext > On 7 Dec 2019, at 03:49, Rik Kabel wrote: > > On 12/6/2019 17:50, Otared Kavian wrote: >> Hi all, >> >> I am preparing a test for my students where I would like to have the >> statement of the problem on the top of a page and the remainder to the >> bottom of that page filled with \thinrules, for them to write the solution. >> And sometimes there might be an empty page filled with thinrules when the >> solution to the exercise is longer. >> >> The following minimal example gives the idea of what I want to achieve, but >> since the statement of each exercise may be longer or shorter, I would like >> ConTeXt to compute how many \thinrules can be put in the remainder of the >> page. >> That is, can one imagine a macro named (say) \fillpagewiththinrules which >> puts the exact number of thinrules before ejecting the page? >> Is this possible or have I to do it by hand for each page? >> >> \showframe >> \starttext >> \dorecurse{2}{\input knuth.tex\par} >> >> \thinrules[n=20] % On the first page I can put 20 thinrules >> >> \page >> >> \thinrules[n=40] % On an empty page I can put 40 thinrules >> \page >> >> \input ward.tex >> >> \thinrules[n=37] % On the third page there can be 37 thinrules >> >> \stoptext >> >> Thanks for any hint and help, >> Best regards: Otared K. >> ___ >> 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 >> >> ___ >> > It looks like Wolfgang answered this a while back. See Re: [NTG-context] Room > for comment on the backside of form. . > > -- > Rik > > ___ > 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 ___
Re: [NTG-context] Filling a page with \thinrules
On 12/6/2019 17:50, Otared Kavian wrote: Hi all, I am preparing a test for my students where I would like to have the statement of the problem on the top of a page and the remainder to the bottom of that page filled with \thinrules, for them to write the solution. And sometimes there might be an empty page filled with thinrules when the solution to the exercise is longer. The following minimal example gives the idea of what I want to achieve, but since the statement of each exercise may be longer or shorter, I would like ConTeXt to compute how many \thinrules can be put in the remainder of the page. That is, can one imagine a macro named (say) \fillpagewiththinrules which puts the exact number of thinrules before ejecting the page? Is this possible or have I to do it by hand for each page? \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrules[n=20] % On the first page I can put 20 thinrules \page \thinrules[n=40] % On an empty page I can put 40 thinrules \page \input ward.tex \thinrules[n=37] % On the third page there can be 37 thinrules \stoptext Thanks for any hint and help, Best regards: Otared K. ___ 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 ___ It looks like Wolfgang answered this a while back. See Re: [NTG-context] Room for comment on the backside of form <https://www.mail-archive.com/search?l=ntg-context@ntg.nl=subject:%22Re%5C%3A+%5C%5BNTG%5C-context%5C%5D+Room+for+comment+on+the+backside+of+form%22=newest>. . -- Rik ___ 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] Filling a page with \thinrules
Hi all, I am preparing a test for my students where I would like to have the statement of the problem on the top of a page and the remainder to the bottom of that page filled with \thinrules, for them to write the solution. And sometimes there might be an empty page filled with thinrules when the solution to the exercise is longer. The following minimal example gives the idea of what I want to achieve, but since the statement of each exercise may be longer or shorter, I would like ConTeXt to compute how many \thinrules can be put in the remainder of the page. That is, can one imagine a macro named (say) \fillpagewiththinrules which puts the exact number of thinrules before ejecting the page? Is this possible or have I to do it by hand for each page? \showframe \starttext \dorecurse{2}{\input knuth.tex\par} \thinrules[n=20] % On the first page I can put 20 thinrules \page \thinrules[n=40] % On an empty page I can put 40 thinrules \page \input ward.tex \thinrules[n=37] % On the third page there can be 37 thinrules \stoptext Thanks for any hint and help, Best regards: Otared K. ___ 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] thinrules
Macro \thinrules places vertical whitespace before the first of its lines. I would like to get rid of that one, but have no success in doint that. Usage is: \par\thinrules[..]\par Howto? H van der Meer ___ 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] thinrules
Am 17.05.2012 um 17:46 schrieb Meer, H. van der: Macro \thinrules places vertical whitespace before the first of its lines. I would like to get rid of that one, but have no success in doint that. Usage is: \par\thinrules[..]\par Howto? \starttext a \hrule b \strut a \hrule \strut b \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 ___
Re: [NTG-context] thinrules
Am 17.05.2012 um 18:09 schrieb Meer, H. van der: Thanks, From your answer I understand that collapsing the preceding vertical space is impossible with \thinrules. \thinrule adds \strut at the begin of the rule which results in vertical space above and below. 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] thinrules
\thinrules disappear when then are the lone item and I can make them appear only by typeing somthing behind/before. However, I would to force a thin rule anyway, even if there is no surrounding text. How? Hans van der Meer ___ 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] thinrules
On 16-4-2010 10:57, Hans van der Meer wrote: \thinrules disappear when then are the lone item and I can make them appear only by typeing somthing behind/before. However, I would to force a thin rule anyway, even if there is no surrounding text. How? put something invisible in front, \strut or so - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___