[NTG-context] \attachment
It seems that there is a mixup in the backend code for including an attachment. For example, when I use: \setupinteraction[state=start] \starttext The current file is \attachment[tag][file=\jobname.tex, name=test.tex, title={Whatever}] \stoptext I was expecting that the current file will be attached as "test.tex" and title "Whatever. However, the title of the attached file is "tag". See the attached screenshot from Adobe Reader. It seems that in the back end, tag is written to the PDF file where title should have been written. Aditya<>___ 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] a way to implement \testcolumn in mixedcolumns
On 11/20/2013 10:47 PM, Lars Huttar wrote: Hello, On this list I've been advised that mixedcolumns is the latest and greatest implementation of columns; the one to use. We have switched over from columnsets to mixedcolumns, and have been very pleased with the column balancing (for some reason we couldn't get column balancing to work in columnsets). However one thing we do miss from columnsets is the control over widows & orphans in two ways: \testcolumn, and \setupcolumnsetlines. \testcolumn[n] allowed us to do a conditional column break, so when we were about to start a new subsection heading, we could prevent it being an orphan at the bottom of the column; and when starting a paragraph with a hangaround graphic framed flushright and bottom, we could similarly use \testcolumn to prevent the graphic from hanging down into the footer (which is what sometimes happened otherwise). So I'm wondering, is there some way to achieve the equivalent of \testcolumn in mixedcolumns? Is it theoretically impossible to implement this in mixedcolumns because the required information (how many lines are left in the current column) is not yet known? Or could that information be gleaned from somewhere? I see in page-brk.mkiv the following definition for \testcolumn: \def\testcolumn {\dodoubleempty\page_tests_columns_test} \def\page_tests_columns_test[#1][#2]% {\endgraf \ifdim\pagegoal<\maxdimen \ifdim\pagetotal<\pagegoal \d_page_tests_test\dimexpr \pagegoal -\pagetotal \ifdim\lastskip<\parskip+\parskip\fi \ifsecondargument+#2\fi \relax \getrawnoflines\d_page_tests_test % (raw) \ifnum#1>\noflines \column \fi \else \penalty-\plustenthousand % (untested) \fi \fi} I'm not a low-level TeX programmer, and I don't understand a lot of this, but it looks like \getrawnoflines\d_page_tests_test puts the number of remaining lines into \noflines Any suggestions are appreciated. (And I should have a MWE soon.) That macro was never meant for mixed columns. I made a variant that works ok in mixed columns which will be in the next beta. \setuptolerance[verytolerant] \starttext \startmixedcolumns \dorecurse{4}{\input ward \par} \testcolumn[10][-1pt] % 10 lines - 1pt slack \dorecurse{2}{\input ward \par} \stopmixedcolumns \stoptext - 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 ___
Re: [NTG-context] bibliography - maybeyear
On 11/20/2013 9:12 AM, Alan Braslau wrote: Hello, Using \setuppublications [alternative=num] for example, should not append letters to the publication years when encountering multiple publications by the same author(s) per year. So, in the use of bibliographies, I have not understood how to control \maybeyear. In the bibl-xxx.tex files, it is defined as \def\maybeyear#1{#1} or \def\maybeyear#1{} as needed. Perhaps this is for mkii. In bibl-bib.mkiv, one has \appendtoks \doifelse{\bibtexpublicationsparameter\c!maybeyear}\v!off {\let\maybeyear\gobbleoneargument} {\let\maybeyear\firstofoneargument}% \to \everysetupbibtexlistplacement which seems to then use the keyword maybeyear. I guess that \setupbibtexpublications [maybeyear=off] in my source would turn off the appended letters, but this is not correct. I have tried many variants (\setuppublications, \setupbibtex). What am I misunderstanding? Or is this a bug? \setuppublicationlist [maybeyear=off] you can deduce that from \bibtexpublicationsparameter which you can read as \parameter i.e. it is bound to \setup Hans - 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 ___
Re: [NTG-context] Unexpected behaviour of enumeration in mkiv
2013/11/19 Thomas Möbius : > 2013/11/18 Wolfgang Schuster : >> >> Am 15.11.2013 um 17:02 schrieb Thomas Möbius : >> >>> Hi, >>> >>> please have a look at the minimal example at the bottom. I am >>> typesetting theorems and lemmata which are numbered consecutively >>> within chapters in a book. I used the same code for a document >>> written in mkii, and I thought I could just reuse it in mkiv. >>> Obviously, there is something I am missing. Question: How do I get >>> the same output when compiling the following code with 'context' as >>> when compiled with 'texexec'. >>> >>> When compiled with 'context', the chapter number is missing in the >>> numbering of theorems. Lemmas are not numbered at all. >>> >>> ~~~snip~~~ >>> \setupenumerations >>>[title=yes, >>>style=normal, >>>list=all, >>>before={\blank[big]}, >>>after={\blank[big]}, >>>location=serried, >> >> Change “location=serried” to “alternative=serried”. >> >>>width=broad, >>>distance=0.5em, >>>headstyle=bold, >>>titlestyle=bold, >>>way=bychapter, >>>conversion=numbers] >> >> You have to change “conversion” to “numberconversion” but this isn’t >> necessary because numbers are the default conversion format. >> >> To have chapter numbers as part of the counter add “prefix=yes”. >> >>> \defineenumeration >>>[theorem] >>>[text=Theorem, listtext={Theorem }] >>> >>> \defineenumeration >>>[lemma] >>>[text=Lemma, listtext={Lemma }, number=theorem] >> >> To use the counter of another enumeration use “counter=theorem”, not >> “name=theorem”. >> >> Wolfgang > > > Thanks Wolfgang for the quick answer. I changed my code accordingly. > The "prefix=yes" option, though, does not entirely do as I expect it. > It adds the chapter+section number as a prefix to each theorem (and > lemma). As I have "way=bychapter" in my options, though, it doesn't > reset after a new section started (which is what I want!). The effect > is odd as you can see in the minimal example. > > I only want to have the chapter number as a prefix. It's probably > simple? difficult? > > Minimal example: > > ~~~snip~~~ > \setupenumerations > [title=yes, > style=normal, > list=all, > before={\blank[big]}, > after={\blank[big]}, > alternative=serried, > width=broad, > distance=0.5em, > headstyle=bold, > titlestyle=bold, > way=bychapter, > prefix=yes] > > \defineenumeration > [theorem] > [text=Theorem, listtext={Theorem }] > > \defineenumeration > [lemma] > [text=Lemma, listtext={Lemma }, counter=theorem] > > \starttext > > \chapter{First chapter} > > \section{First section} > > \theorem Hello > > \theorem Hello > > \lemma Hello > > \theorem Hello > > \section{Second section} > > \lemma Hello > > \theorem Hello > > \chapter{Second chapter} > > \section{First section} > > \theorem Hello > > \lemma Hello > > \section{Second section} > > \lemma Hello > > \theorem Hello > > \stoptext > ~~~snip~~~ To answer my own question, adding way=bychapter, prefixsegments=chapter, did the job! ___ 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] Line numbers and tabulate cells in Mark IV
On 11/27/2013 5:42 PM, Adam Khan wrote: The lines of a tabulate cell may be numbered with code like the following under Mark II, but not under Mark IV. \starttabulate[|p|p|] \NC \input knuth \NC \startlinenumbering \input knuth \stoplinenumbering \NC\NR \stoptabulate How may the lines of a tabulate cell be numbered under Mark IV? put this in your cont-new.mkiv file: \unprotect \installtexdirective {tabulate.linenumbers} {\def\tabl_tabulate_check_linenumbers {\page_postprocessors_linenumbers_deepbox\b_tabl_tabulate}} {\let\tabl_tabulate_check_linenumbers\relax} \let\tabl_tabulate_check_linenumbers\relax \def\tabl_tabulate_splitoff_box {\dontcomplain \global\setbox\b_tabl_tabulate\vsplit \b_tabl_tabulate_current\c_tabl_tabulate_column to \lineheight \setbox\b_tabl_tabulate\vbox {\unvbox\b_tabl_tabulate}% \ifconditional\c_tabl_tabulate_splitoff_whitespace \tabl_tabulate_check_whitespace \fi \tabl_tabulate_color_repeat \setbox\b_tabl_tabulate\hbox to \wd\b_tabl_tabulate {\hss\tabl_tabulate_hook_yes{\box\b_tabl_tabulate}\hss}% \tabl_tabulate_normalize_splitline \tabl_tabulate_check_linenumbers \box\b_tabl_tabulate} \protect if it works ok you can wikify it as for sure i forget about it \starttext \enabledirectives[tabulate.linenumbers] \startmixedcolumns \startlinenumbering \input ward \stoplinenumbering \column \startlinenumbering \input knuth \stoplinenumbering \stopmixedcolumns \starttabulate[|p|i3p|] \NC \startlinenumbering \input ward \par \stoplinenumbering \NC \startlinenumbering \input knuth \par \stoplinenumbering \NC \NR \stoptabulate \stoptext - 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 ___
Re: [NTG-context] Line numbers and tabulate cells in Mark IV
On 11/27/2013 5:42 PM, Adam Khan wrote: The lines of a tabulate cell may be numbered with code like the following under Mark II, but not under Mark IV. \starttabulate[|p|p|] \NC \input knuth \NC \startlinenumbering \input knuth \stoplinenumbering \NC\NR \stoptabulate How may the lines of a tabulate cell be numbered under Mark IV? in your case: \startmixedcolumns \startlinenumbering \input knuth \stoplinenumbering \column \startlinenumbering \input knuth \stoplinenumbering \stopmixedcolumns as it looks like currently tabulate has no numbered line support. Hans - 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 ___
Re: [NTG-context] [***SPAM***] Incorrect internal font processing
On 11/27/2013 11:35 PM, Jan Tosovsky wrote: On 2013-11-27 Jan Tosovsky wrote: On 2013-11-27 Hans Hagen wrote: On 11/27/2013 10:20 PM, Jan Tosovsky wrote: On 2013-11-27 Hans Hagen wrote: On 11/27/2013 9:53 PM, Jan Tosovsky wrote: On 2013-11-27 Hans Hagen wrote: On 11/27/2013 8:44 PM, Jan Tosovsky wrote: during my attempts to patch the Palatino's dotless 'i' I found that this font is parsed incorrectly by ConTeXt. Comparing index/name info of individual glyphs in the font software and resulting pala.tma file there is the following difference: Index | Name - font| Name - tma 1110 | dotlessi.smcp | i.sc(1) 1170 | i.smcp | i.sc(2) The first one should have IMHO a different name. The same name for two glyphs might be dangerous. the fact that there are two i.sc in the font is suspicious ... best check the font in fontforge ... one never know what kind of things other programs do Hmm, FontForge glyphs naming corresponds to what we can observe in the ConTeXt (doubled i.sc). My previous analysis was based on FontLab. I am confused now... Actually, there are no names of these glyphs available in the font so they are calculated(!) Each of two programs uses a different method. FontLab method is based on layout tables - GPOS, GSUB, GDEF (it somehow detects that both glyps that is okay to make names unique, although there can still be multiple variants so in fact i.smcp and i.ss01.4 are valid names then, but .smcp and .onum are not understood by name parsers (for adobe glyph names) differs). The FontForge method is unclear and seems to be buggy. But we some kind of numbering would make more sense i.1 or so should blame rather the font itself as it is the primary cause of these problems (= missing glyph names). indeed Hans - 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 ___
[NTG-context] Line numbers and tabulate cells in Mark IV
The lines of a tabulate cell may be numbered with code like the following under Mark II, but not under Mark IV. \starttabulate[|p|p|] \NC \input knuth \NC \startlinenumbering \input knuth \stoplinenumbering \NC\NR \stoptabulate How may the lines of a tabulate cell be numbered under Mark IV? Sincerely yours, Adam Khan ___ 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 ___