Re: [NTG-context] Different Styles of Typing
On 7/28/2021 2:14 PM, Jeroen via ntg-context wrote: Is there a way to have two different types of typing. I tried the following, but it does not seem to work. \setuptyping[abc][style=\ttx] \setuptyping[def][style=\ttxx] \starttext \starttyping[abc] text text \stoptyping \starttyping[def] text text \stoptyping \stoptext in lmtx we can do this \definetyping[abc] \setuptyping[abc][style=\ttx] \definetyping[def] \setuptyping[def][style=\ttxx] \unprotect \tolerant\def\buff_verbatim_typing_start_yes[#1]#*[#2]% {\let\m_typing\currenttyping \ifhastok={#1}% \setupcurrenttyping[#1]% \orelse\ifcstok{#1}\v!continue \lettypingparameter\c!continue\v!yes \orelse\iftok{#1}\emptytoks % assume typing \orelse\ifcstok{#1}\v!typing % no overload \else \edef\currenttyping{#1}% \fi \ifparameter#2\or \setupcurrenttyping[#2]% \fi \typingparameter\c!before\relax \startpacked[\v!blank]% \buff_verbatim_setup_line_numbering \buff_verbatim_initialize_typing_one \buff_verbatim_setup_keep_together \normalexpanded{\buff_verbatim_type_block{\e!start\m_typing}{\e!stop\m_typing}}} \protect \starttext \starttyping[abc][color=red] [text] text \stoptyping \starttyping[def][style=\sl] text text \stoptyping \startdef text text \stopdef \stoptext but first i want wolfgangs opinion on this (possible side effects and such) Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Different Styles of Typing
Is there a way to have two different types of typing. I tried the following, but it does not seem to work. \setuptyping[abc][style=\ttx] \setuptyping[def][style=\ttxx] \starttext \starttyping[abc] text text \stoptyping \starttyping[def] text text \stoptyping \stoptext ___ 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] Different Typing Styles
Is there a way to have two different styles of typing. I tried the following, but it does not seem to work. \setuptyping[abc][style=\ttx] \setuptyping[def][style=\ttxx] \starttext \starttyping[abc] example example \stoptyping \starttyping[def] example example \stoptyping \stoptext Thanks Jeroen ___ 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] Question about \groupedcommand{}{}
Hi, The name of the environment must always end with a dot both with a title and without title. How to do ? Thanks Fabrice \setupenumerations [before={\blank}, after={\blank}, alternative=serried, title=yes, titleleft={(}, titleright={)}, titlestyle=normal, titlecommand=\groupedcommand{}{\bf.}, width=broad] \defineenumeration [definition] [text=Définition, number=no, headcommand=\groupedcommand{}{}, style=italic] \starttext \startdefinition{With a title} \samplefile{lorem} \stopdefinition Without title but no dot after the name of the environment. \startdefinition \samplefile{lorem} \stopdefinition \stoptext ___ 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] Macro that does not work in an environment
Fabrice Couvreur schrieb am 27.07.2021 um 18:24: Hi, The macro \card must allow the word Card to be written in the normal style. Hans' solution works well. To use \text with a certain style use a \mathtext.. command, e.g. \define[1]\card {\m{\mathtexttf{Card}\thinspace#1}} Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Macro that does not work in an environment
On 7/27/2021 4:32 PM, Fabrice Couvreur via ntg-context wrote: Hello, How to make the macro work in the environment definition ? not sure what you want to achieve, maybe this? \protected\def\card#1{\m{\mfunction{Card}\thinspace#1}} \defineenumeration [définition] [text=Définition, number=no, headcommand=\groupedcommand{}{.}, style=italic] \starttext \startdéfinition Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le nombre d'éléments de E. En particulier, nous avons \m{\card{\emptyset}=0}. \stopdéfinition \stoptext Thank you Fabrice \unexpanded\def\card#1{\math{\text{Card}\thinspace#1}} \defineenumeration [definition] [text=Définition, number=no, headcommand=\groupedcommand{}{.}, style=italic] \starttext \startdefinition Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le nombre d'éléments de E. En particulier, nous avons \m{\card{\emptyset}=0}. \stopdefinition \stoptext ___ 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Macro that does not work in an environment
Hello, How to make the macro work in the environment definition ? Thank you Fabrice \unexpanded\def\card#1{\math{\text{Card}\thinspace#1}} \defineenumeration [definition] [text=Définition, number=no, headcommand=\groupedcommand{}{.}, style=italic] \starttext \startdefinition Soit E un ensemble fini. Le cardinal de E, noté \card{E}, est le nombre d'éléments de E. En particulier, nous avons \m{\card{\emptyset}=0}. \stopdefinition \stoptext ___ 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] Adjust the length of a frame
-- Forwarded message - De : Fabrice Couvreur Date: lun. 26 juil. 2021 à 13:13 Subject: Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame To: mailing list for ConTeXt users Hello, Following on from my previous questions for writing my book (thanks again Wolfgang), I have to create a solution environment like the attached image. My problem is adjusting the length of the frame. Thank you. Fabrice \setupbodyfont[newcomputermodern-book,11pt] \defineframed [ACFRAME] [frame=off, width=fit, align=flushleft, location=low, background=color, backgroundcolor=lightgray, foregroundcolor=, foregroundstyle=] \setupenumerations [before={\blank}, after={\blank}, alternative=top, title=yes, titleleft={}, titleright={}, titlestyle=bold, width=broad] \defineenumeration [exercice] [text=Exercice, number=yes, numbercommand=\groupedcommand{}{.}, style=italic] \defineenumeration [solution] [text=Solution, headcommand=\ACFRAME, number=no, numbercommand=\groupedcommand{}{}, style=normal] \starttext \startexercice{Le nombre d'or est irrationnel} Le nombre d'or, noté \m{\phi}, est tel que \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. \stopexercice \startsolution Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. \stopsolution \stoptext ___ 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] Adjust the length of a frame
Le lun. 26 juil. 2021 à 13:13, Fabrice Couvreur a écrit : > Hello, > Following on from my previous questions for writing my book (thanks again > Wolfgang), I have to create a solution environment like the attached image. > My problem is adjusting the length of the frame. > Thank you. > Fabrice > > \setupbodyfont[newcomputermodern-book,11pt] > > \defineframed >[ACFRAME] >[frame=off, > width=fit, > align=flushleft, > location=low, > background=color, > backgroundcolor=lightgray, > foregroundcolor=, > foregroundstyle=] > > > \setupenumerations > [before={\blank}, >after={\blank}, >alternative=top, >title=yes, >titleleft={}, >titleright={}, >titlestyle=bold, >width=broad] > > \defineenumeration > [exercice] >[text=Exercice, > number=yes, > numbercommand=\groupedcommand{}{.}, > style=italic] > > \defineenumeration >[solution] >[text=Solution, > headcommand=\ACFRAME, > number=no, > numbercommand=\groupedcommand{}{}, > style=normal] > > \starttext > > \startexercice{Le nombre d'or est irrationnel} > Le nombre d'or, noté \m{\phi}, est tel que > \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. > \stopexercice > > \startsolution > Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. > \stopsolution > > \stoptext > ___ 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] Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame
Hello, Following on from my previous questions for writing my book (thanks again Wolfgang), I have to create a solution environment like the attached image. My problem is adjusting the length of the frame. Thank you. Fabrice \setupbodyfont[newcomputermodern-book,11pt] \defineframed [ACFRAME] [frame=off, width=fit, align=flushleft, location=low, background=color, backgroundcolor=lightgray, foregroundcolor=, foregroundstyle=] \setupenumerations [before={\blank}, after={\blank}, alternative=top, title=yes, titleleft={}, titleright={}, titlestyle=bold, width=broad] \defineenumeration [exercice] [text=Exercice, number=yes, numbercommand=\groupedcommand{}{.}, style=italic] \defineenumeration [solution] [text=Solution, headcommand=\ACFRAME, number=no, numbercommand=\groupedcommand{}{}, style=normal] \starttext \startexercice{Le nombre d'or est irrationnel} Le nombre d'or, noté \m{\phi}, est tel que \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. \stopexercice \startsolution Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. \stopsolution \stoptext ___ 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] \setupinitial: style Parameter resets size
Hi, since the lettrine module does not work with LMTX, I’ve looked into \setupinitial. (There is a different thread about this.) There is a „style“ parameter to change the style, but whenever I change the style, the font size is reset. This is not what I expected. This was the case in context before LMTX, thus it is not a regression. % !TEX TS-program = ConTeXt (LuaTeX LMTX2021) % !TEX encoding = UTF-8 Unicode \starttext \setupinitial[color=red] \start \setupinitial[n=2,m=1] \placeinitial\input ward \stop \start \setupinitial[style=\tf,n=2,m=1] \placeinitial\input ward \stop \start \setupinitial[font=Roman at 32 pt,n=2,m=1] \placeinitial\input ward \stop \start \setupinitial[style=\it,n=2,m=1] \placeinitial\input ward \stop \start \setupinitial[font=Italic at 32 pt,n=2,m=1] \placeinitial\input ward \stop \start \setupinitial[style=\it,font=Italic at 32 pt,n=2,m=1] \placeinitial\input ward \stop \stoptext Are my expectations wrong? Greetings Axel ___ 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] How to place text before a table inside a column environment
I have created a table and placed it inside a columns environment; which works as advertised. However, if I place any text before the column environment, the columns break. More clearly stated, only one column appears on the first table page; whereas two columns resume on subsequent pages. I have attached a mwe where you can use --mode=title to invoke the broken columns. Any advice on how to place text above the columns environment would be gratefully received. With kind regards, Michael \startsetups[tablesettings] \setupTABLE[c][1][style=\tfc, color=darkred, align=left] \setupTABLE[c][2][width=3cm, align=middle] \setupTABLE[c][each][frame=off] \stopsetups \switchtobodyfont[10pt] \starttext \doifmode{title}{\title{Rooster}} \startcolumns[n=2] \bTABLE[split=yes, setups=tablesettings] \dorecurse{75}{\bTR \bTD 25 \eTD \bTD aug, wo \eTD \bTD Lecture \eTD \eTR} \eTABLE \stopcolumns \stoptext ___ 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] Solution: LMTX initial (drop cap) in combination with indenting
> On 21 Jul 2021, at 22:38, Nicola wrote: > > On 2021-07-21, Gerben Wierda <mailto:gerben.wie...@rna.nl>> wrote: >>> On 19 Jul 2021, at 09:56, Nicola wrote: >>> >>> On 2021-07-18, Gerben Wierda wrote: >>>> PS. switching \kap and \bf has an interesting result, the first >>>> character of the words is not in bold. This did not happen with >>>> lettrine in mkii >>> >>> I do not have an answer 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 then I get with > > I was sure that I had used lettrine with MKIV in a document of mine, but > after your reply I double checked that and, in fact, I was using > lettrine only with MKII. On the plus side, I have recovered my settings > for MKIV (which work with LMTX as well). > > I think that the `distance` parameter of \setupinitials does what you > want. Besides, if your font provides real small capitals, you may use > \definefirstline. > > This is how I set up things in one of my documents: > > > \definefontfeature[default][default][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 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 body text starts with a drop cap: > \defineinitial[normal][ > n=3, > m=1, > distance=18pt, % <== Add this > state=start > ] > > % Special case: drop cap starting with a quote > \defineinitial[quote][ > n=3, > m=2, > distance=13pt, > hoffset=5pt, % Move drop cap a bit to the left > method=none > ] > > % Some initials may need special adjustments, depending on the font > \defineinitial[Q][ > voffset=2\lineheight, > n=3, > m=1, > distance=18pt, > state=start > ] > > % Full first line in small caps > \definefirstline[smallcapsfirstline][ > alternative=line, > style=smallcaps, > ] > > % First n words in small caps (three in this case) > \definefirstline[smallcapsfirstlinethree][ > alternative=word, > n=3, > style=smallcaps, > ] > > \starttext > \setfirstline[smallcapsfirstlinethree] > \setinitial[normal] Suppose we have a system for the approval of > loans. \input knuth > \blank[2*big] > > \setfirstline[smallcapsfirstline] > \setinitial[quote] “Suppose we have a system for the approval of > loans.” \input knuth > \blank[2*big] > > \setfirstline[smallcapsfirstline] > \setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu > etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit > audacia? > > \stoptext > > > I hope this will give you some ideas! > > References: > >https://wiki.contextgarden.net/Command/setupinitial > <https://wiki.contextgarden.net/Command/setupinitial> >https://wiki.contextgarden.net/Command/definefirstline > <https://wiki.contextgarden.net/Command/definefirstline> >https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy > <https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy> > > Nicola Hi Nicola, Thanks. This solves the indentation of the initial itself. What remains is the indentation of the text immediately after, e.g. the 'uppose we’. Minimum example (also visible in your example): % This combination of indenting and initial does not work properly, the text following the initial should be unindented \definemeasure[CAindent][12pt] \setupindenting[yes,\measure{CAindent}] % Every chapter body text starts with a drop cap: \defineinitial[normal][n=3,m=1,hoffset=\measure{CAindent},state=start] \starttext \setinitial[normal] S {\bf{\kap uppose we}} have a system for the approval of loans. \input knuth \stoptext The ‘uppose we’ should not be indented more than the
Re: [NTG-context] Use of lettrine module in LMTX
On 2021-07-21, Gerben Wierda wrote: >> On 19 Jul 2021, at 09:56, Nicola wrote: >> >> On 2021-07-18, Gerben Wierda wrote: >>> PS. switching \kap and \bf has an interesting result, the first >>> character of the words is not in bold. This did not happen with >>> lettrine in mkii >> >> I do not have an answer 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 then I get with I was sure that I had used lettrine with MKIV in a document of mine, but after your reply I double checked that and, in fact, I was using lettrine only with MKII. On the plus side, I have recovered my settings for MKIV (which work with LMTX as well). I think that the `distance` parameter of \setupinitials does what you want. Besides, if your font provides real small capitals, you may use \definefirstline. This is how I set up things in one of my documents: \definefontfeature[default][default][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 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 body text starts with a drop cap: \defineinitial[normal][ n=3, m=1, distance=18pt, % <== Add this state=start ] % Special case: drop cap starting with a quote \defineinitial[quote][ n=3, m=2, distance=13pt, hoffset=5pt, % Move drop cap a bit to the left method=none ] % Some initials may need special adjustments, depending on the font \defineinitial[Q][ voffset=2\lineheight, n=3, m=1, distance=18pt, state=start ] % Full first line in small caps \definefirstline[smallcapsfirstline][ alternative=line, style=smallcaps, ] % First n words in small caps (three in this case) \definefirstline[smallcapsfirstlinethree][ alternative=word, n=3, style=smallcaps, ] \starttext \setfirstline[smallcapsfirstlinethree] \setinitial[normal] Suppose we have a system for the approval of loans. \input knuth \blank[2*big] \setfirstline[smallcapsfirstline] \setinitial[quote] “Suppose we have a system for the approval of loans.” \input knuth \blank[2*big] \setfirstline[smallcapsfirstline] \setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit audacia? \stoptext I hope this will give you some ideas! References: https://wiki.contextgarden.net/Command/setupinitial https://wiki.contextgarden.net/Command/definefirstline https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy Nicola ___ 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] Moving the old book-structure to a recent ConTeXt
Gerben Wierda schrieb am 16.07.2021 um 15:51: Is there a new template I can download somewhere to start from scratch? There is no template but show below a example for a document which uses the project structure. The examples are just my own preference and there are many ways to change them to fit your own style. 1. File names In the example all sub files (style + chapters) start with the name of the main file and append a sub name. Another popular naming scheme is to prefix the files with c_ (component), p_ (product) or s_ (style/environment). To avoid problems should also try to use only ASCII characters for the file names and avoid anything which is special in TeX, using spaces or extra periods should be avoided as well. 2. Arguments for \component etc. In my example I passed the argument to \component, \startproduct etc. in square brackets but this is only a alternative form to older way, where you passed it without the brackets. Both \component document-xxx and \component [document-xxx] are valid and you can use whatever you prefer. 3. Position of \environment In my example I load the environment-file after \startproduct and \startcomponent but it's also possible to load it before them. There are reasons for both positions and when you choose one you should keep it for all files. 4. \startdocument In my product file I added a document-environment, while it isn't necessary in this case it provides a nice hook to insert a title page for your document. begin document.tex \startproduct [*] \environment [document-environment] \startdocument % \startfrontmatter % % load components with table of contents, introduction etc. % % \stopfrontmatter \startbodymatter \component [document-xxx] \stopbodymatter \stopdocument \stopproduct end document.tex begin document-environment.tex \startenvironment [*] % sub directory for images % % \setupexternalfigures % [directory=...] % % sub directories for components % % \usepath % [...] % put you setups here \stopenvironment end document-environment.tex begin document-xxx.tex \startcomponent [*] \environment [document-environment] % put your content here \stopcomponent end document-xxx.tex Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mp-geo Metapost package with ConTeXt
> Am 17.07.2021 um 12:45 schrieb Hans Hagen : > > On 7/17/2021 12:20 PM, Henning Hraban Ramm wrote: >>> Am 17.07.2021 um 11:53 schrieb Bruce Horrocks : >>> >>> >>> >>>> On 16 Jul 2021, at 20:55, Hans Hagen wrote: >>>> >>>> On 7/15/2021 10:30 PM, Bruce Horrocks wrote: >>>>> On 15 Jul 2021, at 18:58, Hans Hagen wrote: >>>>>> >>>>>> I was wondering about that too. I admit that I looked into maps years >>>>>> ago but never could find quality data files. >>>>> Does this help? >>>>> <https://www.naturalearthdata.com> >>>> i was halfway writing as reader for that fiel format when i noticed that >>>> is is also quite low res so i gave up on that and started playing >>>> (extending) with an more interesting alternative that mojca and i wrote >>>> years ago at a meeting >>> >>> Off the top of my head I'm not aware of any higher resolution sources of >>> global data - what scale were you thinking of? >> Can you work with OpenStreetMap data? >> https://planet.openstreetmap.org >> http://download.geofabrik.de >> https://download.bbbike.org/osm/ >> I didn’t find excerpts that only have e.g. country borders or rivers. But >> with usual XML tools you could extract those. > Indeed, that is what I was referring too. Mojca found this: > https://osm-boundaries.com/ Ah, our mails crossed... > At a bachotex meeting (years ago, when the ctx group donated a nice roadmap > display to the conference) we made an openstreetmap -> metapost style but > afaik that never made it into a module. So, when I remembered that I updated > it. I can now render my hometown (need to figure out colors) quite okay. (One > can export an osm file in openstreetmap but with some limitations on size.) > > I have to play a bit more with the style before I define it useable but the > interface is liek this: > > % where i live > > \startMPpage >draw lmt_openstreetmap [ >filename = "hasselt.osm" >grid = "dots", >] ; > \stopMPpage > > % island in paris > > \startMPpage >draw lmt_openstreetmap [ >filename = "e:/tmp/map.osm" >] ; > \stopMPpage > > The hasselt osm file is sime 12 MB, the colorful hasselt pdf file just below > 1 MB so that's okay (3.7 sec processing time on my machine so if all claims > are right sub seconds on a fast new apple). > > Of course I need to make colors and what gets rendered configurable (via the > interface). It's more about the fun aspect .. no need to typeset complete > routes because that's what the web is for. For our architectural guides I make maps with OSM data and Maperitive. It’s a PITA (sooo slow with Mono on OSX and hadly documented), but works. Maperitive uses "mrules" style files (example attached). [call] mono --desktop Maperitive/Maperitive.Console.exe -defaultscript=false ../baukultur.mscript inkscape -z -f citymap.svgz -A citymap.pdf [baukultur.mscript] set-setting name=map.decoration.attribution value=false set-setting name=map.decoration.grid value=false set-setting name=map.decoration.scale value=false set-setting name=map.rendering.font-family value="AlegreyaSans" use-ruleset location=Maperitive/Rules/baukultur.mrules // load some additional data, e.g. markers load-source archiguide.osm // exported OSM city map load-source bonn.osm // Stadthalle BG move-pos y=50.68064 x=7.15849 zoom=17 set-home set-geo-bounds 7.153,50.6840,7.162,50.6772 set-print-bounds-geo 7.153,50.6840,7.162,50.6772 export-svg file=citymap.svgz compatibility=inkscape map-scale=5000 Hraban baukultur.mrules Description: Binary data ___ 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] mp-geo Metapost package with ConTeXt
On 7/17/2021 12:20 PM, Henning Hraban Ramm wrote: Am 17.07.2021 um 11:53 schrieb Bruce Horrocks : On 16 Jul 2021, at 20:55, Hans Hagen wrote: On 7/15/2021 10:30 PM, Bruce Horrocks wrote: On 15 Jul 2021, at 18:58, Hans Hagen wrote: I was wondering about that too. I admit that I looked into maps years ago but never could find quality data files. Does this help? <https://www.naturalearthdata.com> i was halfway writing as reader for that fiel format when i noticed that is is also quite low res so i gave up on that and started playing (extending) with an more interesting alternative that mojca and i wrote years ago at a meeting Off the top of my head I'm not aware of any higher resolution sources of global data - what scale were you thinking of? Can you work with OpenStreetMap data? https://planet.openstreetmap.org http://download.geofabrik.de https://download.bbbike.org/osm/ I didn’t find excerpts that only have e.g. country borders or rivers. But with usual XML tools you could extract those. Indeed, that is what I was referring too. Mojca found this: https://osm-boundaries.com/ At a bachotex meeting (years ago, when the ctx group donated a nice roadmap display to the conference) we made an openstreetmap -> metapost style but afaik that never made it into a module. So, when I remembered that I updated it. I can now render my hometown (need to figure out colors) quite okay. (One can export an osm file in openstreetmap but with some limitations on size.) I have to play a bit more with the style before I define it useable but the interface is liek this: % where i live \startMPpage draw lmt_openstreetmap [ filename = "hasselt.osm" grid = "dots", ] ; \stopMPpage % island in paris \startMPpage draw lmt_openstreetmap [ filename = "e:/tmp/map.osm" ] ; \stopMPpage The hasselt osm file is sime 12 MB, the colorful hasselt pdf file just below 1 MB so that's okay (3.7 sec processing time on my machine so if all claims are right sub seconds on a fast new apple). Of course I need to make colors and what gets rendered configurable (via the interface). It's more about the fun aspect .. no need to typeset complete routes because that's what the web is for. Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Harvard bibliography style
Alan, Thanks for your reply and support. I have found some diferences (I’m still search for more) APA. -> Harvard Citation: (Author, year) -> (Author year) (No comma) Bibliography: APA: Preston, N. (2014). Understanding ethics (4th ed.). The Federation Press. HARVARD: Preston, N 2014, Understanding ethics, 4th edn, The Federation Press, Annandale, N.S.W. (No parenthesis) APA: “Bolman, L. G., & Deal, T. E. (2017). Reframing organizations: Artistry, choice, and leadership. John Wiley & Sons.” Harvard: “Bolman, L.G. and Deal, T.E., 2017. Reframing organizations: Artistry, choice, and leadership. John Wiley & Sons.” Jorge Magalhães ___ 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] Harvard bibliography style
On 16/07/21 20:05, Jorge Manuel wrote: Dear Sirs Is there a way to set my bibliography style to Harvard specifications? Tanks four your support Have a nice day Jorge Magalhães There is no Harvard bibliography specification, but the system is designed to be totally configurable. What is exactly the specification? The best way to proceed is to start from an existing specification such as APA for an author-years system and adapt it to your specific needs. I can help you with this. -- Alan ___ 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] Harvard bibliography style
Dear Sirs Is there a way to set my bibliography style to Harvard specifications? Tanks four your support Have a nice day Jorge Magalhães ___ 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] Problem with chapter numbering
Hi, For my book, the header for each chapter should be like the attached image. I don't know if I am using the best method, but the result looks like what I want. Nevertheless, I am having a problem. I don't understand why the first chapter is not numbered while the second is with number 1 etc. Thanks. Fabrice ### \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] \defineframedtext [FramedText] [ offset=0.6em, style=, toffset=\lineheight, background=color, backgroundcolor=MyColorA, foregroundstyle={\switchtobodyfont[11pt]}, align={left, broad}, frame=off, width=\textwidth, ] \setuplabeltext [en] [chapter=CHAPITRE] \setuppagenumbering [alternative=doublesided,location=] \unexpanded\def\HeadTitle#1#2% { \FramedText{{\cap\labeltext{chapter}}\space#1 \\ \bfc#2} } \unexpanded\def\processheadnumber#1% {\getmarking[chapternumber]} \setuphead [chapter] [style=\bfd, align={flushleft,broad}, numbercommand=\processheadnumber, command=\HeadTitle] \starttext \startchapter [title={La récurrence}] \startsection[title={Le principe de récurrence}] \input knuth \stopsection \startsection[title={Le raisonement par récurrence}] \input knuth \stopsection \startsection[title={Récurrences fortes}] \input knuth \stopsection \startsection[title={Exercices corrigés}] \input knuth \stopsection \stopchapter \startchapter [title=Combinatoire-Dénombrement] \input knuth \stopchapter \startchapter [title=Suites] \input knuth \stopchapter \stoptext ___ 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] Header for a book
Hi, My first solution is incorrect ; with the second solution, I don't understand why the first chapter is not numbered while the second is with number 1. Thanks. Fabrice \unexpanded\def\HeadTitle#1#2% { \FramedText{{\cap\labeltext{chapter}}\space#1 \\ \bfc#2} } \unexpanded\def\processheadnumber#1% {\getmarking[chapternumber]} \setuphead [chapter] [style=\bfd, align={flushleft,broad}, numbercommand=\processheadnumber, command=\HeadTitle] \starttext \startchapter [title={La récurrence}] \startsection[title={Le principe de récurrence}] \dorecurse{10}{\input knuth} \stopsection \startsection[title={Le raisonement par récurrence}] \dorecurse{10}{\input knuth} \stopsection \startsection[title={Récurrences fortes}] \dorecurse{10}{\input knuth} \stopsection \startsection[title={Exercices corrigés}] \dorecurse{10}{\input knuth} \stopsection \stopchapter \startchapter [title=Combinatoire-Dénombrement] \dorecurse{10}{\input knuth} \stopchapter \stoptext Le lun. 12 juil. 2021 à 16:32, Fabrice Couvreur a écrit : > Hi, > For my book, the header for each chapter should be like the attached image. I > don't know if I am using the best method, but the result looks like what I > want. Nevertheless, I am having some problems : > 1. the header appears on each page ; > 2. the title of the chapter should not appear in the body of the text. > Thanks for your help. > Fabrice > > \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] > \defineframedtext > [FramedText] > [ > offset=0.6em, > style=, > toffset=\lineheight, > background=color, > backgroundcolor=MyColorA, > foregroundstyle={\switchtobodyfont[11pt]}, > align={left, broad}, > frame=off, > width=\textwidth, > ] > > > \setuplabeltext > [en] > [chapter=CHAPITRE] > > \setuphead >[chapter] >[bodypartlabel=] > > > \startsetups [header] > \labeltext{chapter} \getmarking[chapternumber] > \stopsetups > > \setupheadertexts > [] > [{\FramedText{{\cap\labeltext{chapter}\space\getmarking[chapternumber]} > \\ > \bfc\getmarking[chapter]}}] > [] > [\FramedText{{\cap\labeltext{chapter}\space \getmarking[chapternumber]} > \\ >\bfc\getmarking[chapter]}] > > > \setuppagenumbering > [alternative=doublesided,location=] > \starttext > \startchapter [title=La récurrence] > \startsection[title={Le principe de récurrence}] > \dorecurse{10}{\input knuth} > \stopsection > \startsection[title={Le raisonement par récurrence}] > \dorecurse{10}{\input knuth} > \stopsection > \startsection[title={Récurrences fortes}] > \dorecurse{10}{\input knuth} > \stopsection >\startsection[title={Exercices corrigés}] > \dorecurse{10}{\input knuth} > \stopsection > \stopchapter > \startchapter [title=Combinatoire-Dénombrement] > \dorecurse{10}{\input knuth} > \stopchapter > > \stoptext[image: pied_3.png] > > ___ 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] Header for a book
Hi, For my book, the header for each chapter should be like the attached image. I don't know if I am using the best method, but the result looks like what I want. Nevertheless, I am having some problems : 1. the header appears on each page ; 2. the title of the chapter should not appear in the body of the text. Thanks for your help. Fabrice \definecolor[MyColorA][r=0.8784, g=0.8784, b=0.8784] \defineframedtext [FramedText] [ offset=0.6em, style=, toffset=\lineheight, background=color, backgroundcolor=MyColorA, foregroundstyle={\switchtobodyfont[11pt]}, align={left, broad}, frame=off, width=\textwidth, ] \setuplabeltext [en] [chapter=CHAPITRE] \setuphead [chapter] [bodypartlabel=] \startsetups [header] \labeltext{chapter} \getmarking[chapternumber] \stopsetups \setupheadertexts [] [{\FramedText{{\cap\labeltext{chapter}\space\getmarking[chapternumber]} \\ \bfc\getmarking[chapter]}}] [] [\FramedText{{\cap\labeltext{chapter}\space \getmarking[chapternumber]} \\ \bfc\getmarking[chapter]}] \setuppagenumbering [alternative=doublesided,location=] \starttext \startchapter [title=La récurrence] \startsection[title={Le principe de récurrence}] \dorecurse{10}{\input knuth} \stopsection \startsection[title={Le raisonement par récurrence}] \dorecurse{10}{\input knuth} \stopsection \startsection[title={Récurrences fortes}] \dorecurse{10}{\input knuth} \stopsection \startsection[title={Exercices corrigés}] \dorecurse{10}{\input knuth} \stopsection \stopchapter \startchapter [title=Combinatoire-Dénombrement] \dorecurse{10}{\input knuth} \stopchapter \stoptext[image: pied_3.png] ___ 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] Initial caps with short paragraph
On 7/9/2021 1:58 AM, Thangalin wrote: This has come up before on the mailing list, but I was wondering if LMTX has a more elegant solution than using a transparent/invisible capture of the drop-cap. Consider: |\setupinitial[n=2, style=\tfd, location=text] \setuphead[chapter][after={\placeinitial}] \starttext \chapter Hello world! \input ward \stoptext | The output shows that the second paragraph is not indented beyond the bounding box of the drop-cap, resulting in an overlap. This isn't a problem when the first paragraph spans two or more lines. Any ideas for how to resolve this without changing the content? all is possible but in a complex system with lots of possible interactions it will never be robust (especially carrying over stuff across paragraphs and page boundaries) I'll provide \forgetinitial and maybe some more clever hack but then i first have to play more with some new features (there are a bunch awaiting experiments). Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Initial caps with short paragraph
This has come up before on the mailing list, but I was wondering if LMTX has a more elegant solution than using a transparent/invisible capture of the drop-cap. Consider: \setupinitial[n=2, style=\tfd, location=text]\setuphead[chapter][after={\placeinitial}] \starttext \chapter Hello world! \input ward\stoptext The output shows that the second paragraph is not indented beyond the bounding box of the drop-cap, resulting in an overlap. This isn't a problem when the first paragraph spans two or more lines. Any ideas for how to resolve this without changing the content? Thank you! ___ 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] Different authorconversion for citation alternatives and bibliographic entries
Oh, and needless to say, I'd be happy to help with this. > -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Freitag, 2. Juli 2021 10:01 > An: 'Alan Braslau' > Cc: ntg-context@ntg.nl > Betreff: AW: [NTG-context] Different authorconversion for citation > alternatives > and bibliographic entries > > > -Ursprüngliche Nachricht- > > Von: Alan Braslau > > Gesendet: Mittwoch, 30. Juni 2021 23:50 > > An: Maier, Denis Christian (UB) > > Cc: ntg-context@ntg.nl > > Betreff: Re: [NTG-context] Different authorconversion for citation > > alternatives and bibliographic entries > > > [...] > > > > > > So what would be needed to make add real support for it? > > > > First of all, come to a consensus on a clear style guide to base this > > on, so as not to run after ambiguous and perhaps contradictory > > specifications. This would be distinct from the APA (author-year) > > model as well as from the minimalist APS > > (numbered) style. Could this perhaps be the Chicago style? (does that > > have a footnote specification?) > > Chicago is certainly not a bad choice for this. It's probably one of the most > complete footnote specifications out there. (I knows multiple variants though, > so you need to settle for one or support both.) One thing to be aware of is > that > Chicago is utterly complex. Other styles like MHRA are a bit simpler. This > complexity might be an advantage and a disadvantage at the same time. It may > be hard to get this completely right. The already mentioned biblatex-chicago > package shows how much is involved. OTOH, if you get this right that should > cover almost everything that might come up in note based styles. > > Denis ___ 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] Different authorconversion for citation alternatives and bibliographic entries
> -Ursprüngliche Nachricht- > Von: Alan Braslau > Gesendet: Mittwoch, 30. Juni 2021 23:50 > An: Maier, Denis Christian (UB) > Cc: ntg-context@ntg.nl > Betreff: Re: [NTG-context] Different authorconversion for citation > alternatives > and bibliographic entries > [...] > > > > So what would be needed to make add real support for it? > > First of all, come to a consensus on a clear style guide to base this on, so > as not > to run after ambiguous and perhaps contradictory specifications. This would be > distinct from the APA (author-year) model as well as from the minimalist APS > (numbered) style. Could this perhaps be the Chicago style? (does that have a > footnote specification?) Chicago is certainly not a bad choice for this. It's probably one of the most complete footnote specifications out there. (I knows multiple variants though, so you need to settle for one or support both.) One thing to be aware of is that Chicago is utterly complex. Other styles like MHRA are a bit simpler. This complexity might be an advantage and a disadvantage at the same time. It may be hard to get this completely right. The already mentioned biblatex-chicago package shows how much is involved. OTOH, if you get this right that should cover almost everything that might come up in note based styles. Denis ___ 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] Rolling out a pandoc-context publication workflow in an organization
Hi, in case you don't know it already, for your use-case you might also be interested in this workflow: https://oa-pub.hos.tuhh.de/de/ It's a publishing workflow for OA-Journals. IIUC, the interesting part (in this context here) is that they use Gitlab, author in markdown, and whenever you push a commit, Gitlab actions are used to produce the final output. I think they use Pandoc and LaTeX with Docker Images, but maybe it could be possible to set something similar up with ConTeXt... Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Jan U. Hasecke > Gesendet: Donnerstag, 1. Juli 2021 08:03 > An: mailing list for ConTeXt users > Betreff: [NTG-context] Rolling out a pandoc-context publication workflow in an > organization > > > Dear all, > > in the last weeks I asked more questions than I normally do. The reason is > that > my organization is discussing to roll out a markdown-pandoc-context > publication workflow. > > Some time ago we started to use context to produce flyers and some other > documents. In fact I was the only one to use it. The results are so good that > we > discussed how to use it more often. > > Currently we use LaTeX to produce our legal documents, terms of services etc. > With ConTeXt we are able to meet our corporate design guidelines and to > produce good looking and individually designed documents. > > But our authors and editors were not willing to use ConTeXt directly so that > we > decided to look into Pandoc and use Markdown as authors input markup. > Markdown is much better supported by text editors than ConTeXt. > > The main problem for me is to come up with a good organization of the > ConTeXt workflow so that it is easy usable and meets our requirements for > quality management. > > These are quite strict. We are a Debian based cooperative and the majority of > our editors also use this distribution on their private computers. Some use a > MacBook, only one uses of Windows. > > For this reason we would like to stay with the Debian ConTeXt, which I never > used as it is quite old. The same is true for Pandoc which made some > improvements in the last years and also is very old in the current Debian > distribution. As we did not decide this issue I can't say how much I have to > refactor our styles to meet the older versions of ConTeXt. > > Apart from this I have to organize our style files and ressources, anyway. > > In another thread Hans said how to use these folders. Thanks a lot. > > texmf-local : maybe configurations > texmf-project : stuff you're working on (styles) > texmf-fonts : fonts you downloaded or bought > > All our styles and our shared image folder are versioned by git so I think > that I > either put links into texmf-project pointing to our style repository and to > our > image repository to have easy access to these ressources no matter how we > call context or to put them into texmf-project directly. (We did not decide > yet > whether we call context from pandoc using a tmp directory for building or > directly from our build script. > > If we use the current lmtx distribution, all editors would have to install > ConTeXt > with the install.sh script on their private computers, then we would either > call a > post installation script to clone the repositories in texmf-project or to > clone > them in another folder and set links to texmf-project. Linking seems better > as I > am not sure what "context generate" would do with the .git folder inside the > repositories. > > All document projects are in their own repository. Currently we use a build > script to call pandoc with an individual set of arguments including a custom > context template which is stored in the document repository, also. Inside of > this > template we include all the environments we need for this particular > document. We have a lot of small environments to reuse them in different > document types. > > This is our plan so far. > > But to role out this successfully I would like to ease the way to a working > pandoc-context installation for our editors. Do you have an idea how to do > this? > > I come up with the idea of an "organizational context distribution" that has > all > requirements preinstalled. That could look like this: > > We have a repository: > > hs.lmtx > > which contains the install script and all our ressources (images and styles). > > Our editors would clone the repository and just call the installation script > to > download the lmtx distribution. Afterwards they are ready to start as we would > point to the right context executable in our build scripts. > &g
Re: [NTG-context] Different authorconversion for citation alternatives and bibliographic entries
Hi Alan, Hans, and Chicago style bibliography users, > 3) I believe that Gavin (on CC:) is a user of the Chicago author-year > model. I’d like to use the Notes and Bibliography style in my physics book, with endnotes after each chapter. I would gladly participate by testing and providing feedback. I am using a patched-together \footnote solution right now, and it is not great. The existing "biblatex-chicago” package might be helpful for development, especially in selecting database syntax and perhaps in designing algorithms. The author, David Fussner, has been maintaining and updating since the first public release in 2008. It the extensive documentation, he invites contact. It looks like a complicated project! I’d be happy to discuss this more at our next Norther Colorado ConTeXt User meeting. Would some time next week work? (Alan, who I met on this mailing list, lives a short bike ride from my house.) Gavin ___ 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] Different authorconversion for citation alternatives and bibliographic entries
Chicago-style footnote user here, I would be interested in helping with testing. Jelle On Wed, Jun 30, 2021 at 11:50 PM Alan Braslau wrote: > > On Wed, 30 Jun 2021 19:40:06 + > wrote: > > > > -Ursprüngliche Nachricht- > > > Von: Alan Braslau > > > Gesendet: Mittwoch, 30. Juni 2021 21:11 > > > An: mailing list for ConTeXt users ; Maier, > > > Denis Christian (UB) > > > Betreff: Re: [NTG-context] Different authorconversion for citation > > > alternatives and bibliographic entries > > > > > > On 30/06/21 12:59, denis.ma...@unibe.ch wrote: > > > > Hi, > > > > > > > >> -Ursprüngliche Nachricht- > > > >> Von: ntg-context Im Auftrag von > > > >> Ágoston Volcz > > > >> Gesendet: Mittwoch, 30. Juni 2021 10:20 An:ntg-context@ntg.nl > > > >> Betreff: [NTG-context] Different authorconversion for citation > > > >> alternatives and bibliographic entries > > > >> > > > >> Hi there, > > > >> > > > >> My university has special requirements for the theses I submit. > > > >> Layout, fonts etc. are pretty straightforward to set up in > > > >> ConTeXt. The one part I'm struggling with is citations / > > > >> bibliography. I have to use the german citation style with > > > >> footnotes. Essentially the first time I cite something, I have > > > >> to put the full entry in a footnote. From the second time on, I > > > >> only have to put a shorter entry in the > > > footnotes. > > > > Is this first citation vs other citations thing currently > > > > possible with ConTeXt? I > > > was thinking that there was no proper support for note style > > > citations in ConTeXt? Has that changed? I remember reading the > > > phrase "We may add additional citation styles if there demand and > > > clear requirements exist." So what's the current state of affairs > > > here? > > > > > > > > Denis > > > > > > Indeed (one can always use \footnote{} but that might not be a good > > > substitute for a proper footnote citation style. > > > > > > I do not use footnote citations as a general style (and personally > > > dislike it, finding them somewhat distracting and sloppy). Yet > > > these are popular in many fields and there is no reason not to > > > support it. > > > > So what would be needed to make add real support for it? > > First of all, come to a consensus on a clear style guide to base this > on, so as not to run after ambiguous and perhaps contradictory > specifications. This would be distinct from the APA (author-year) model > as well as from the minimalist APS (numbered) style. Could this perhaps > be the Chicago style? (does that have a footnote specification?) > > Secondly, identify users who would be willing to spend time testing and > giving feedback. > > Thirdly, motivate Hans and myself to spend time on this (implementing > or helping implement), for neither of us use the footnote style. > > So it can be done, and such a model is presently missing. > > Alan > > ___ > 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 ___
[NTG-context] Rolling out a pandoc-context publication workflow in an organization
Dear all, in the last weeks I asked more questions than I normally do. The reason is that my organization is discussing to roll out a markdown-pandoc-context publication workflow. Some time ago we started to use context to produce flyers and some other documents. In fact I was the only one to use it. The results are so good that we discussed how to use it more often. Currently we use LaTeX to produce our legal documents, terms of services etc. With ConTeXt we are able to meet our corporate design guidelines and to produce good looking and individually designed documents. But our authors and editors were not willing to use ConTeXt directly so that we decided to look into Pandoc and use Markdown as authors input markup. Markdown is much better supported by text editors than ConTeXt. The main problem for me is to come up with a good organization of the ConTeXt workflow so that it is easy usable and meets our requirements for quality management. These are quite strict. We are a Debian based cooperative and the majority of our editors also use this distribution on their private computers. Some use a MacBook, only one uses of Windows. For this reason we would like to stay with the Debian ConTeXt, which I never used as it is quite old. The same is true for Pandoc which made some improvements in the last years and also is very old in the current Debian distribution. As we did not decide this issue I can't say how much I have to refactor our styles to meet the older versions of ConTeXt. Apart from this I have to organize our style files and ressources, anyway. In another thread Hans said how to use these folders. Thanks a lot. texmf-local : maybe configurations texmf-project : stuff you're working on (styles) texmf-fonts : fonts you downloaded or bought All our styles and our shared image folder are versioned by git so I think that I either put links into texmf-project pointing to our style repository and to our image repository to have easy access to these ressources no matter how we call context or to put them into texmf-project directly. (We did not decide yet whether we call context from pandoc using a tmp directory for building or directly from our build script. If we use the current lmtx distribution, all editors would have to install ConTeXt with the install.sh script on their private computers, then we would either call a post installation script to clone the repositories in texmf-project or to clone them in another folder and set links to texmf-project. Linking seems better as I am not sure what "context generate" would do with the .git folder inside the repositories. All document projects are in their own repository. Currently we use a build script to call pandoc with an individual set of arguments including a custom context template which is stored in the document repository, also. Inside of this template we include all the environments we need for this particular document. We have a lot of small environments to reuse them in different document types. This is our plan so far. But to role out this successfully I would like to ease the way to a working pandoc-context installation for our editors. Do you have an idea how to do this? I come up with the idea of an "organizational context distribution" that has all requirements preinstalled. That could look like this: We have a repository: hs.lmtx which contains the install script and all our ressources (images and styles). Our editors would clone the repository and just call the installation script to download the lmtx distribution. Afterwards they are ready to start as we would point to the right context executable in our build scripts. Problem: What will happen if our editors do a git pull in hs.lmtx and a "context generate"? There are also concerns if something breaks after updating context with the install.sh. Is there a way to reset the installation to a given point release? How do you solve this in a production environment? On my private computer I sometimes install a new version of lmtx in a "staging" folder try it out and redo updating in my "production" folder. I think I will try this out but I am happy if you have any comments on this. TIA juh ___ 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] Heading for endnotes / grouped by chapter endnotes
On 6/30/2021 9:04 PM, denis.ma...@unibe.ch wrote: Von: Hans Hagen On 6/30/2021 4:57 PM, denis.ma...@unibe.ch wrote: [...] Will this interfere with how parts are displayed in the regular table of contents? sure but you can group \start .. flush the list \stop although it's not really needed when you do this at the end of the document Hmm, but don't you usually style thing before \starttext? (Ok, you can use setups to keep the definitions in one place.) indeed. one can use setups or define a combined list that has the settings 2. Does this treat endnotes just like a list entry, with page numbers and so? indeed Ok, so you cannot use the regular \setupnotation[endnote][settings] for styling the endnotes? well, this is typical list usage so .. but if needed one can define a so called list alternative for it but it probably doesn't pay off. Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Different authorconversion for citation alternatives and bibliographic entries
On Wed, 30 Jun 2021 19:40:06 + wrote: > > -Ursprüngliche Nachricht- > > Von: Alan Braslau > > Gesendet: Mittwoch, 30. Juni 2021 21:11 > > An: mailing list for ConTeXt users ; Maier, > > Denis Christian (UB) > > Betreff: Re: [NTG-context] Different authorconversion for citation > > alternatives and bibliographic entries > > > > On 30/06/21 12:59, denis.ma...@unibe.ch wrote: > > > Hi, > > > > > >> -Ursprüngliche Nachricht- > > >> Von: ntg-context Im Auftrag von > > >> Ágoston Volcz > > >> Gesendet: Mittwoch, 30. Juni 2021 10:20 An:ntg-context@ntg.nl > > >> Betreff: [NTG-context] Different authorconversion for citation > > >> alternatives and bibliographic entries > > >> > > >> Hi there, > > >> > > >> My university has special requirements for the theses I submit. > > >> Layout, fonts etc. are pretty straightforward to set up in > > >> ConTeXt. The one part I'm struggling with is citations / > > >> bibliography. I have to use the german citation style with > > >> footnotes. Essentially the first time I cite something, I have > > >> to put the full entry in a footnote. From the second time on, I > > >> only have to put a shorter entry in the > > footnotes. > > > Is this first citation vs other citations thing currently > > > possible with ConTeXt? I > > was thinking that there was no proper support for note style > > citations in ConTeXt? Has that changed? I remember reading the > > phrase "We may add additional citation styles if there demand and > > clear requirements exist." So what's the current state of affairs > > here? > > > > > > Denis > > > > Indeed (one can always use \footnote{} but that might not be a good > > substitute for a proper footnote citation style. > > > > I do not use footnote citations as a general style (and personally > > dislike it, finding them somewhat distracting and sloppy). Yet > > these are popular in many fields and there is no reason not to > > support it. > > So what would be needed to make add real support for it? First of all, come to a consensus on a clear style guide to base this on, so as not to run after ambiguous and perhaps contradictory specifications. This would be distinct from the APA (author-year) model as well as from the minimalist APS (numbered) style. Could this perhaps be the Chicago style? (does that have a footnote specification?) Secondly, identify users who would be willing to spend time testing and giving feedback. Thirdly, motivate Hans and myself to spend time on this (implementing or helping implement), for neither of us use the footnote style. So it can be done, and such a model is presently missing. Alan ___ 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] Different authorconversion for citation alternatives and bibliographic entries
> -Ursprüngliche Nachricht- > Von: Alan Braslau > Gesendet: Mittwoch, 30. Juni 2021 21:11 > An: mailing list for ConTeXt users ; Maier, Denis > Christian > (UB) > Betreff: Re: [NTG-context] Different authorconversion for citation > alternatives > and bibliographic entries > > On 30/06/21 12:59, denis.ma...@unibe.ch wrote: > > Hi, > > > >> -Ursprüngliche Nachricht- > >> Von: ntg-context Im Auftrag von Ágoston > >> Volcz > >> Gesendet: Mittwoch, 30. Juni 2021 10:20 An:ntg-context@ntg.nl > >> Betreff: [NTG-context] Different authorconversion for citation > >> alternatives and bibliographic entries > >> > >> Hi there, > >> > >> My university has special requirements for the theses I submit. > >> Layout, fonts etc. are pretty straightforward to set up in ConTeXt. > >> The one part I'm struggling with is citations / bibliography. > >> I have to use the german citation style with footnotes. Essentially > >> the first time I cite something, I have to put the full entry in a > >> footnote. From the second time on, I only have to put a shorter entry in > >> the > footnotes. > > Is this first citation vs other citations thing currently possible with > > ConTeXt? I > was thinking that there was no proper support for note style citations in > ConTeXt? Has that changed? I remember reading the phrase "We may add > additional citation styles if there demand and clear requirements exist." So > what's the current state of affairs here? > > > > Denis > > Indeed (one can always use \footnote{} but that might not be a good substitute > for a proper footnote citation style. > > I do not use footnote citations as a general style (and personally dislike it, > finding them somewhat distracting and sloppy). Yet these are popular in many > fields and there is no reason not to support it. So what would be needed to make add real support for it? ___ 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] Different authorconversion for citation alternatives and bibliographic entries
On 30/06/21 12:59, denis.ma...@unibe.ch wrote: Hi, -Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von Ágoston Volcz Gesendet: Mittwoch, 30. Juni 2021 10:20 An:ntg-context@ntg.nl Betreff: [NTG-context] Different authorconversion for citation alternatives and bibliographic entries Hi there, My university has special requirements for the theses I submit. Layout, fonts etc. are pretty straightforward to set up in ConTeXt. The one part I'm struggling with is citations / bibliography. I have to use the german citation style with footnotes. Essentially the first time I cite something, I have to put the full entry in a footnote. From the second time on, I only have to put a shorter entry in the footnotes. Is this first citation vs other citations thing currently possible with ConTeXt? I was thinking that there was no proper support for note style citations in ConTeXt? Has that changed? I remember reading the phrase "We may add additional citation styles if there demand and clear requirements exist." So what's the current state of affairs here? Denis Indeed (one can always use \footnote{} but that might not be a good substitute for a proper footnote citation style. I do not use footnote citations as a general style (and personally dislike it, finding them somewhat distracting and sloppy). Yet these are popular in many fields and there is no reason not to support it. -- Alan ___ 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] Heading for endnotes / grouped by chapter endnotes
> Von: Hans Hagen > > On 6/30/2021 4:57 PM, denis.ma...@unibe.ch wrote: > > > [...] > > > > Will this interfere with how parts are displayed in the regular table > > of contents? > > sure but you can group > > \start >.. flush the list > \stop > > although it's not really needed when you do this at the end of the document Hmm, but don't you usually style thing before \starttext? (Ok, you can use setups to keep the definitions in one place.) > > > 2. Does this treat endnotes just like a list entry, with page numbers > > and so? > > indeed Ok, so you cannot use the regular \setupnotation[endnote][settings] for styling the endnotes? Denis ___ 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] Different authorconversion for citation alternatives and bibliographic entries
Hi, > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Ágoston Volcz > Gesendet: Mittwoch, 30. Juni 2021 10:20 > An: ntg-context@ntg.nl > Betreff: [NTG-context] Different authorconversion for citation alternatives > and > bibliographic entries > > Hi there, > > My university has special requirements for the theses I submit. > Layout, fonts etc. are pretty straightforward to set up in ConTeXt. > The one part I'm struggling with is citations / bibliography. > I have to use the german citation style with footnotes. Essentially the first > time I > cite something, I have to put the full entry in a footnote. From the second > time > on, I only have to put a shorter entry in the footnotes. Is this first citation vs other citations thing currently possible with ConTeXt? I was thinking that there was no proper support for note style citations in ConTeXt? Has that changed? I remember reading the phrase "We may add additional citation styles if there demand and clear requirements exist." So what's the current state of affairs here? Denis ___ 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] Different authorconversion for citation alternatives and bibliographic entries
On Wed, 30 Jun 2021, Ágoston Volcz wrote: > Hi there, > > My university has special requirements for the theses I submit. > Layout, fonts etc. are pretty straightforward to set up in ConTeXt. > The one part I'm struggling with is citations / bibliography. > I have to use the german citation style with footnotes. Essentially > the first time I cite something, I have to put the full entry in a > footnote. From the second time on, I only have to put a shorter entry > in the footnotes. > I have two problems: > > 1. I created the publ-imp-deu.lua and publ-imp-deu.mkvi files. If I > put them into the > ~/bin/context/tex/texmf-context/tex/context/base/mkiv/ directory, I > get the following two lines in the log: > ``` > publications> unknown library 'deu' > publications> no data definition file 'publ-imp-deu.lua' for 'deu' > ``` > If I put them into the directory where my thesis is, they seem to get > recognized, but I would very much like to reuse them and not have to > copy them to each project directory. What am I doing wrong? Try running mtxrun --generate to update the database. However, I think that texmf-context/... is a bad place to put local files because they can be overwritten by system update. It may be better to put them in $TEXMFHOME/tex/context/personal/... 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Different authorconversion for citation alternatives and bibliographic entries
Hi there, My university has special requirements for the theses I submit. Layout, fonts etc. are pretty straightforward to set up in ConTeXt. The one part I'm struggling with is citations / bibliography. I have to use the german citation style with footnotes. Essentially the first time I cite something, I have to put the full entry in a footnote. From the second time on, I only have to put a shorter entry in the footnotes. I have two problems: 1. I created the publ-imp-deu.lua and publ-imp-deu.mkvi files. If I put them into the ~/bin/context/tex/texmf-context/tex/context/base/mkiv/ directory, I get the following two lines in the log: ``` publications> unknown library 'deu' publications> no data definition file 'publ-imp-deu.lua' for 'deu' ``` If I put them into the directory where my thesis is, they seem to get recognized, but I would very much like to reuse them and not have to copy them to each project directory. What am I doing wrong? 2. Entries in the bibliography and fist time citations must have 'normal' authorconversion, while consequent citations must have 'normalshort'. For consequent citations I defined the 'authortitle' alternative. In the thesis I have: ``` \usebtxdataset[default][literature.bib] \usebtxdefinitions[deu] \setupbtx[deu] ``` A snippet from the publ-imp-deu.mkvi: ``` \definebtx [deu:list] [deu] [authorconversion=normal] \definebtx [deu:cite] [deu] [authorconversion=normalshort, alternative=authortitle] \startsetups btx:deu:list:book {\sc \btxflush{author}}\btxcolon \btxflush{title} \btxdoif{subtitle}{\btxperiod\btxflush{subtitle}}\btxperiod \btxflush{address}\btxcolon \btxflush{publisher} \btxflush{year} \btxdoif{series}{ (\btxflush{series} \btxflush{volume})}\btxperiod \stopsetups ``` In the setup and definition, the fields I defined do get into the citation correctly, but the authorconversion remains 'normal'. If I comment out the lines which set up 'normal' authorconversion for the list, everything, including the bibliography and 'entry' type citations get 'normalshort'. Is that a bug or am I missing something? Thank you, Agoston ___ 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] First line of larger font paragraph on grid
Ok, I've now tried to adapt my real document to this (see below). But I'm running into some problems: 1. I'm not sure whether to use \setuplocalinterlinespace or \setupinterlinespace. With \setuphead, \setuplocalinterlinespace works, but it doesn't work with \framed... But even with \setuphead it leads to results I didn't expect: \blank[force,3*line,depth] -> four empty lines instead of three. 2. foregroundstyle={\bfe\setupinterlinespace[line=17.5pt]} works sort of with the default fonts, i.e. the visuals are ok, but with \showstruts enabled, you see that the struts are incorrect. Now, with the font I have to use (Noto Serif Semicondensed ExtraBold at 15pt, with linespacing 17.5pt, available at http://www.google.com/get/noto/#serif-lgc) this shows up even visually: The letters are placed a tiny bit below the baseline. Any ideas? Hints? TIA, Denis %- \setuplayout[grid=yes] \showgrid \showstruts \definefont [BigFont] [Bold at 20pt] [28pt] \definefontsize[e] % < added \definebodyfontenvironment [12pt] [e=20pt] % < added \definebodyfontenvironment [10pt] [e=15pt] % < added dm \definebodyfontenvironment [10pt] [interlinespace=14pt] % < added dm %\definefontfamily[mainface][rm][Noto Serif] % [tf=file:NotoSerif-SemiCondensed.ttf] % < added dm \setupbodyfont[mainface,10pt] % < added dm \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style=\bfe, %style={\bfe\setupinterlinespace[line=17.5pt]}, style={\bfe\setuplocalinterlinespace[line=17.5pt]}, after=, before=, command=\section_command, ] \protect \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, foregroundstyle=\bfe,% < added foregroundstyle={\bfe\setupinterlinespace[line=17.5pt]}, % < dm, added; does work partially; struts are incorrect foregroundstyle={\bfe\setuplocalinterlinespace[line=17.5pt]}, % < dm, added; does not work strut=yes, % < added before=, location=top, align=flushleft,] \starttext \blank[force,3*line,depth] \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext%- > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von > denis.ma...@unibe.ch > Gesendet: Sonntag, 27. Juni 2021 16:57 > An: ntg-context@ntg.nl > Betreff: Re: [NTG-context] First line of larger font paragraph on grid > > Thanks, Garulfo. I don't use \definedfont in my real document so I should be > able to port it to my use case. And now I've learned about foregroundstyle. (I > was already a bit perplexed that \framed has no style key.) > > Just out of curiousity, perhaps someone (Hans? Wolfgang?) knows more about > the underlying issue? > > Denis > > > -Ursprüngliche Nachricht- > > Von: ntg-context Im Auftrag von Garulfo > > Gesendet: Samstag, 26. Juni 2021 12:37 > > An: ntg-context@ntg.nl > > Betreff: Re: [NTG-context] First line of larger font paragraph on grid > > > > To have the two pages similar > > > > There is something linked with the use of \definefont. > > Don't know if it properly impacts the interlinespace for example. > > > > %-- > > > > \setuplayout[grid=yes] > > \showgrid > > > > \definefont [BigFont] [Bold at 20pt] [28pt] > > > > \definefontsize[e] % < added > > \definebodyfontenvironment [12pt] [e=20pt] % < added > > > > \unprotect > > \unexpanded\def\section_command#1#2{% > >\framed [ > > width=\textwidth, > > frame=off, > > rulethickness=0pt, > > offset=0pt, > > loffset=-0pt, > > befo
Re: [NTG-context] First line of larger font paragraph on grid
Thanks, Garulfo. I don't use \definedfont in my real document so I should be able to port it to my use case. And now I've learned about foregroundstyle. (I was already a bit perplexed that \framed has no style key.) Just out of curiousity, perhaps someone (Hans? Wolfgang?) knows more about the underlying issue? Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Garulfo > Gesendet: Samstag, 26. Juni 2021 12:37 > An: ntg-context@ntg.nl > Betreff: Re: [NTG-context] First line of larger font paragraph on grid > > To have the two pages similar > > There is something linked with the use of \definefont. > Don't know if it properly impacts the interlinespace for example. > > %-- > > \setuplayout[grid=yes] > \showgrid > > \definefont [BigFont] [Bold at 20pt] [28pt] > > \definefontsize[e] % < added > \definebodyfontenvironment [12pt] [e=20pt] % < added > > \unprotect > \unexpanded\def\section_command#1#2{% >\framed [ > width=\textwidth, > frame=off, > rulethickness=0pt, > offset=0pt, > loffset=-0pt, > before=, > location=top, > align=flushleft,]{#2}% > } > > > \setuphead [section] [ > style=\bfe, > after=, > before={\blank[1*line]}, >command=\section_command, > ] > \protect > > > \defineframed[myframed][ > width=\textwidth, > frame=off, > rulethickness=0pt, > offset=0pt, > loffset=-0pt, > foregroundstyle=\bfe,% < added > strut=yes, % < added > before=, > location=top, > align=flushleft,]% < removed dup "]" > > \starttext > > \blank[force,3*line,depth] > > %\begingroup% < removed > %\BigFont % < removed > \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem > ipsum dolor sit amet consectetur adipisicing elit} > %\endgroup % < removed > > asdfasdf > > \page > \blank[force,3*line,depth] > > \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit > Lorem ipsum dolor sit amet consectetur adipisicing elit] >asdf > \stopsection > > \stoptext > > %-- > > > Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit : > > Hi, > > > > I have some text in a larger font where the first line should be on > > the grid. Therefore, I’ve tried to adapt the solution from the wiki: > > https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_ > > grid > > <https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the > > _grid> > > > > The interesting thing is that the section command indeed places the > > first line on the grid, but using \framed directly does not give the > > desired results. > > > > I must be missing something obvious. Does anyone know a solution ? > > > > Thanks for your help, > > > > Denis > > > > === > > > > \setuplayout[grid=yes] > > > > \showgrid > > > > \definefont [BigFont] [Bold at 20pt] [24pt] > > > > \unprotect > > > > \unexpanded\def\section_command#1#2{% > > > > \framed [ > > > > width=\textwidth, > > > > frame=off, > > > > rulethickness=0pt, > > > > offset=0pt, > > > > loffset=-0pt, > > > > before=, > > > > location=top, > > > > align=flushleft,]{#2}% > > > > } > > > > \setuphead [section] [ > > > > style={\BigFont}, > > > > after=, > > > > before={\blank[1*line]}, > > > > command=\section_command, > > > > ] > > > > \protect > > > > \defineframed[myframed][ > > > > width=\textwidth, > > > > frame=off, > > > > rulethickness=0pt, > > > > offset=0pt, > > > > loffset=-0pt, > > > > before=, > > > >
Re: [NTG-context] Soft-hyphen in Antykwa.
On 6/26/2021 18:38, Rik Kabel wrote: All, In recent compilations of a document using Antykwa Torunska Condensed (in headings in the margin), I now have no hyphen at a word break, and see the following in the log: fonts > checking > char  (U+000AD) in font 'AntykwaTorunskaCond-Regular' with id 73: missing Is there a way to restore the hyphen that once appeared? (ConTeXt ver: 2021.06.25 22:49 LMTX). More information, sorry for the lack of detail in the first post. 1. The problem appears to be associated with tagging. Set the state to stop, or remove the line, and the hyphen appears. 2. When HeadFont is libertinus, there is no problem. Sample document: \definefontfamily [HeadFont] [rm] [Antykwa Torunska Cond] \setuphead [chapter] [style=\HeadFont\tfa] \setuphead [section] [alternative=margintext, before={\blank[big]\blank}, insidesection={\blank[-line]\setupindenting[next]}, style=\HeadFont\tf] \setupindenting[yes, small] \setuptagging [state=start] \setupbodyfont [libertinus,12pt] \starttext \startchapter[title=Testing Antykwa Torunska Condensed breaks] \input klein \startsection [title=Abracadabra] \input knuth \stopsection \stopchapter \stoptext -- 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] First line of larger font paragraph on grid
To have the two pages similar There is something linked with the use of \definefont. Don't know if it properly impacts the interlinespace for example. %-- \setuplayout[grid=yes] \showgrid \definefont [BigFont] [Bold at 20pt] [28pt] \definefontsize[e] % < added \definebodyfontenvironment [12pt] [e=20pt] % < added \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style=\bfe, after=, before={\blank[1*line]}, command=\section_command, ] \protect \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, foregroundstyle=\bfe,% < added strut=yes, % < added before=, location=top, align=flushleft,]% < removed dup "]" \starttext \blank[force,3*line,depth] %\begingroup% < removed %\BigFont % < removed \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} %\endgroup % < removed asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext %-- Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit : Hi, I have some text in a larger font where the first line should be on the grid. Therefore, I’ve tried to adapt the solution from the wiki: https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid <https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid> The interesting thing is that the section command indeed places the first line on the grid, but using \framed directly does not give the desired results. I must be missing something obvious. Does anyone know a solution ? Thanks for your help, Denis === \setuplayout[grid=yes] \showgrid \definefont [BigFont] [Bold at 20pt] [24pt] \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style={\BigFont}, after=, before={\blank[1*line]}, command=\section_command, ] \protect \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]] \starttext \blank[force,3*line,depth] \begingroup \BigFont \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} \endgroup asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext = ___ 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] First line of larger font paragraph on grid
A proposal === \setuplayout[grid=yes] \showgrid \definefont [BigFont] [Bold at 20pt] [28pt] \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style={\BigFont}, after=, before={\blank[1*line]}, command=\section_command, ] \protect \definefontsize[e] % < added \definebodyfontenvironment [12pt] [e=20pt] % < added \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, foregroundstyle=\bfe,% < added strut=yes, % < added before=, location=top, align=flushleft,]% < removed dupl "]" \starttext \blank[force,3*line,depth] %\begingroup% < removed %\BigFont % < removed \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} %\endgroup % < removed asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit : Hi, I have some text in a larger font where the first line should be on the grid. Therefore, I’ve tried to adapt the solution from the wiki: https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid <https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid> The interesting thing is that the section command indeed places the first line on the grid, but using \framed directly does not give the desired results. I must be missing something obvious. Does anyone know a solution ? Thanks for your help, Denis === \setuplayout[grid=yes] \showgrid \definefont [BigFont] [Bold at 20pt] [24pt] \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style={\BigFont}, after=, before={\blank[1*line]}, command=\section_command, ] \protect \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]] \starttext \blank[force,3*line,depth] \begingroup \BigFont \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} \endgroup asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext = ___ 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] ntg-context Digest, Vol 204, Issue 76
> On 25 Jun 2021, at 21:15, ntg-context-requ...@ntg.nl wrote: > > Send ntg-context mailing list submissions to > ntg-context@ntg.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.ntg.nl/mailman/listinfo/ntg-context > or, via email, send a message with subject or body 'help' to > ntg-context-requ...@ntg.nl > > You can reach the person managing the list at > ntg-context-ow...@ntg.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..." > Today's Topics: > > 1. Re: Align in setup header/footer (Jan U. Hasecke) > 2. First line of larger font paragraph on grid (denis.ma...@unibe.ch) > 3. Re: Align in setup header/footer (denis.ma...@unibe.ch) > 4. Re: Align in setup header/footer (denis.ma...@unibe.ch) > 5. Re: Align in setup header/footer (Jan U. Hasecke) > > From: "Jan U. Hasecke" > Subject: Re: [NTG-context] Align in setup header/footer > Date: 25 June 2021 at 20:23:24 AEST > To: > > > > Hi Denis, > > Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch: >> Or, for more complex footers/headers you can use: >> \setupfootertexts >> [left on odd page] % out >> [right on odd page] % in >> [right on even page] % in >> [left on even page] % out > > In fact it is something like this > > \setupfootertexts > [margin] > [] > [\pagenumber] > [\pagenumber] > [] > > I want to align the number inside of this area to the right or the left > respectively. > > I only found setuplayouttext to style the area, except that there is no key > "align". > > juh > > > > > From: > Subject: [NTG-context] First line of larger font paragraph on grid > Date: 25 June 2021 at 20:30:29 AEST > To: > > > Hi, > > I have some text in a larger font where the first line should be on the grid. > Therefore, I’ve tried to adapt the solution from the wiki: > https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid > > The interesting thing is that the section command indeed places the first > line on the grid, but using \framed directly does not give the desired > results. > > I must be missing something obvious. Does anyone know a solution ? > > Thanks for your help, > Denis > > === > \setuplayout[grid=yes] > \showgrid > > \definefont [BigFont] [Bold at 20pt] [24pt] > > \unprotect > \unexpanded\def\section_command#1#2{% > \framed [ >width=\textwidth, >frame=off, >rulethickness=0pt, >offset=0pt, >loffset=-0pt, >before=, >location=top, >align=flushleft,]{#2}% > } > > > \setuphead [section] [ > style={\BigFont}, > after=, >before={\blank[1*line]}, > command=\section_command, > ] > \protect > > \defineframed[myframed][ >width=\textwidth, >frame=off, >rulethickness=0pt, >offset=0pt, >loffset=-0pt, >before=, >location=top, >align=flushleft,]] > > \starttext > > \blank[force,3*line,depth] > > \begingroup > \BigFont > \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum > dolor sit amet consectetur adipisicing elit} > \endgroup > > asdfasdf > > \page > \blank[force,3*line,depth] > > \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit > Lorem ipsum dolor sit amet consectetur adipisicing elit] > asdf > \stopsection > > \stoptext > = > > > > > > > From: > Subject: Re: [NTG-context] Align in setup header/footer > Date: 25 June 2021 at 20:31:00 AEST > To: > > > You can use \hfill > >> -Ursprüngliche Nachricht- >> Von: ntg-context Im Auftrag von Jan U. Hasecke >> Gesendet: Freitag, 25. Juni 2021 12:23 >> An: ntg-context@ntg.nl >> Betreff: Re: [NTG-context] Align in setup header/footer >> >> >> Hi Denis, >> >> Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch: >>> Or, for more complex footers/headers you can use: >>> \setupfootertexts >>> [left on odd page] % out >>> [right on odd page] % in >>> [right on even page] % in >>> [left on even page] % o
Re: [NTG-context] Align in setup header/footer
Hi Denis, Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch: Or, for more complex footers/headers you can use: \setupfootertexts [left on odd page] % out [right on odd page] % in [right on even page] % in [left on even page] % out In fact it is something like this \setupfootertexts [margin] [] [\pagenumber] [\pagenumber] [] I want to align the number inside of this area to the right or the left respectively. I only found setuplayouttext to style the area, except that there is no key "align". juh ___ 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] Align in setup header/footer
but you'll perhaps have to put the stuff inside a hbox first \definehbox[pagenumber][12.5mm] \setupfootertexts [] [{\getmarking[chapter]}\hboxpagenumber{\hfill\pagenumber}] [\hboxpagenumber{\pagenumber\hfill}{\getmarking[part]}][] > -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Freitag, 25. Juni 2021 12:31 > An: ntg-context@ntg.nl > Betreff: AW: [NTG-context] Align in setup header/footer > > You can use \hfill > > > -Ursprüngliche Nachricht- > > Von: ntg-context Im Auftrag von Jan U. > > Hasecke > > Gesendet: Freitag, 25. Juni 2021 12:23 > > An: ntg-context@ntg.nl > > Betreff: Re: [NTG-context] Align in setup header/footer > > > > > > Hi Denis, > > > > Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch: > > > Or, for more complex footers/headers you can use: > > > \setupfootertexts > > > [left on odd page] % out > > > [right on odd page] % in > > > [right on even page] % in > > > [left on even page] % out > > > > In fact it is something like this > > > > \setupfootertexts > >[margin] > >[] > > [\pagenumber] > >[\pagenumber] > >[] > > > > I want to align the number inside of this area to the right or the > > left respectively. > > > > I only found setuplayouttext to style the area, except that there is > > no key "align". > > > > juh > > > > > ___ > > 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] Align in setup header/footer
You can use \hfill > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Jan U. Hasecke > Gesendet: Freitag, 25. Juni 2021 12:23 > An: ntg-context@ntg.nl > Betreff: Re: [NTG-context] Align in setup header/footer > > > Hi Denis, > > Am 25.06.21 um 09:50 schrieb denis.ma...@unibe.ch: > > Or, for more complex footers/headers you can use: > > \setupfootertexts > > [left on odd page] % out > > [right on odd page] % in > > [right on even page] % in > > [left on even page] % out > > In fact it is something like this > > \setupfootertexts >[margin] >[] >[\pagenumber] >[\pagenumber] >[] > > I want to align the number inside of this area to the right or the left > respectively. > > I only found setuplayouttext to style the area, except that there is no key > "align". > > juh > > ___ > 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 ___
[NTG-context] First line of larger font paragraph on grid
Hi, I have some text in a larger font where the first line should be on the grid. Therefore, I've tried to adapt the solution from the wiki: https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid The interesting thing is that the section command indeed places the first line on the grid, but using \framed directly does not give the desired results. I must be missing something obvious. Does anyone know a solution ? Thanks for your help, Denis === \setuplayout[grid=yes] \showgrid \definefont [BigFont] [Bold at 20pt] [24pt] \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]{#2}% } \setuphead [section] [ style={\BigFont}, after=, before={\blank[1*line]}, command=\section_command, ] \protect \defineframed[myframed][ width=\textwidth, frame=off, rulethickness=0pt, offset=0pt, loffset=-0pt, before=, location=top, align=flushleft,]] \starttext \blank[force,3*line,depth] \begingroup \BigFont \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit} \endgroup asdfasdf \page \blank[force,3*line,depth] \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext = ___ 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] typescripts and variants
On 6/23/2021 10:32 PM, Henning Hraban Ramm wrote: Am 23.06.2021 um 21:42 schrieb Bruce Horrocks : On 23 Jun 2021, at 07:43, Henning Hraban Ramm wrote: You can combine whatever you like in one typescript, but you’re restricted to six styles (regular, italic, slanted, bold, bold italic, bold slanted). You can just “abuse” the italic or slanted styles for your other weights. If we're restricted to six styles why does this Wiki page show seven? in principle one can define as many new ones as one wants ... it doesn't happen in practice <https://wiki.contextgarden.net/Simple_Typescript_Example> Not meant as a criticism - just a naive question from someone who is puzzled. Yes, you could also abuse \sc for another style. Small caps are a bit special though, nowadays they’re often contained in fonts and you address them via OpenType features. Hraban ___ 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] typescripts and variants
> Am 23.06.2021 um 21:42 schrieb Bruce Horrocks : > > >> On 23 Jun 2021, at 07:43, Henning Hraban Ramm wrote: >> >> You can combine whatever you like in one typescript, but you’re restricted >> to six styles (regular, italic, slanted, bold, bold italic, bold slanted). >> You can just “abuse” the italic or slanted styles for your other weights. > > If we're restricted to six styles why does this Wiki page show seven? > > <https://wiki.contextgarden.net/Simple_Typescript_Example> > > Not meant as a criticism - just a naive question from someone who is puzzled. Yes, you could also abuse \sc for another style. Small caps are a bit special though, nowadays they’re often contained in fonts and you address them via OpenType features. Hraban ___ 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] typescripts and variants
denis.ma...@unibe.ch schrieb am 23.06.2021 um 11:05: Hi, Am 23.06.2021 um 08:43 schrieb Henning Hraban Ramm : Am 23.06.2021 um 00:17 schrieb denis.ma...@unibe.ch: Hi In my current project I need to use different variants if the Noto Serif font (Regular, Medium, Semi Condensed Bold, Regular ExtraBold.) Is my understanding of typescripts correct that I cannot have bold and extrabold in the same typescript? And that I need a typescript for regular and one for the semicondensed variants? You can combine whatever you like in one typescript, but you’re restricted to six styles (regular, italic, slanted, bold, bold italic, bold slanted). You can just “abuse” the italic or slanted styles for your other weights. ... or use roman styles, if you don’t need roman. Thanks for your help. After playing a bit more with the different variants for loading fonts it looks like I don't even need to use typescripts. \definefontfamily works just as good: \definefontfamily[mainface][rm][Noto Serif] \definefontfamily[mainface-semicond][rm][Noto Serif] [tf=file:NotoSerif-SemiCondensed.ttf, it=file:NotoSerif-SemiCondensedItalic.ttf, bf=file:NotoSerif-SemiCondensedBold.ttf, bi=file:NotoSerif-SemiCondensedBoldItalic.ttf] But, do typescripts have any advantages over that approach? Even when you use \definefontfamily the internal font handling relies on the typescripts. The advantage of hand written (or generated) typescripts is better reliability, most of the time you pass just a name to \definefontfamily and some font is chosen for each style but this can fail because all depends on the information in the font files. When you use a typescript each alternative is associated with a certain font file and almost no guess work is required. Then, for fonts used only in specific contexts, you can also do something like \definefont [TitleFont] [notoserifsemicondensedextrabold] and use that with \TitleFont But you will then also need \TitleMonoFont etc, whereas it seems easier to keep things consistent with \definefontfamily... One thing I'm wondering about: Would it be possible to add a easy mechanism to switch to different variants of a font, say, to use the SemiCondensed variant or the ExtraCondensed or so? (Or does that already exist?) And, what about adding more styles so that you could have Light, Medium, SemiBold, Bold, ExtraBold, Black etc. all defined in a single fontfamily? If that was available each font family would then define all the styles for one variant (SemiCondensed, ExtraCondensed, Condensed, each with 18 styles!) You can add more alternatives (\it, \bf ...) to the font mechanism but this requires additional settings (\definebodyfont ...) to get it working. A limiting factor is that you have to stick to two-letter names for each alternative and the easier solution is to create additional typefaces. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] the --path option
Hi all, to answer the question myself is: yes --path is the right option. I wrote a build script that calls context inside a deep nested directory like this: context --path="${environmentdir}" --result=${project}.pdf ${project}.tex The variable ${environmentdir} is created by the script. Everything works fine. But now I would like to use a second path variable in a style file instead of this long relative path: \setupexternalfigures[directory={../../../hs.pub.bilder},local] Any idea how to achieve this? TIA Jan Ulrich Hasecke -- Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays: . http://www.sudelbuch.de Privater Blog: http://www.hasecke.eu Netzliteratur-Projekt: http://www.generationenprojekt.de signature.asc Description: PGP signature ___ 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] A not so short introduction to ConTeXt - French version - progress report.
you are right, it is on my todo list. Le 17/06/2021 à 04:04, Aditya Mahajan a écrit : On Wed, 16 Jun 2021, Garulfo wrote: Hi all, Joaquín I hope your are doing well. To keep you informed of my progress on the French version of "a not so short introduction to ConTeXt", I am done for part I, and II, and I am starting with Part III... Thanks. The visual style does look nice. One question about the translation. Does it make sense to introduce the French interface as well (\demarretexte ... \stoppetexte, etc.)? 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://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] A not so short introduction to ConTeXt - French version - progress report.
On Wed, 16 Jun 2021, Garulfo wrote: > Hi all, Joaquín > > I hope your are doing well. > > To keep you informed of my progress on the French version of "a not so > short introduction to ConTeXt", I am done for part I, and II, and I am > starting with Part III... Thanks. The visual style does look nice. One question about the translation. Does it make sense to introduce the French interface as well (\demarretexte ... \stoppetexte, etc.)? 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 6/14/2021 5:13 PM, Pablo Rodriguez wrote: On 6/13/21 7:31 PM, Hans Hagen wrote: Hi, A few things (1) Thomas and I picked up the facing floats thread. I will probably remove the experimental code from mkiv and only work on the lmtx implementation. The same can be true for streams. Many thanks for the new latest, Hans. I have compiled the sample from page-ffl.mkxl: \starttext \definefacingfloat [whatever] \setupfacingfloat [whatever] [style=bold, width=frame, offset=10pt, color=white] \setupfacingfloat [whatever:left] [background=color, backgroundcolor=red] \setupfacingfloat [whatever:right] [background=color, backgroundcolor=green] \startfacingfloat[whatever] {\dorecurse{10}{\samplefile{tufte} }} {\dorecurse{10}{\samplefile{ward} }} {\dorecurse{10}{\samplefile{tufte} }} {\dorecurse{10}{\samplefile{ward} }} \stopfacingfloat \startfacingfloat[whatever] \startcontent \dorecurse{10}{\samplefile{tufte} } \stopcontent \startcontent \dorecurse{10}{\samplefile{ward} } \stopcontent \startcontent \dorecurse{10}{\samplefile{tufte} } \stopcontent \startcontent \dorecurse{10}{\samplefile{ward} } \stopcontent \stopfacingfloat \flushfacingfloats \dorecurse{10}{\samplefile{sapolsky} } \stoptext I’m afraid that the resulting PDF document only contains the text from Sapolsky (no facing floats). Sorry, but I have no idea about what I may be doing wrong (or whether there is an issue here). The interface is evolving (so it's not meant for production ... it's what Thomas and i are exploring so it might change till it suits his needs). Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 6/13/21 7:31 PM, Hans Hagen wrote: > Hi, > > A few things > > (1) Thomas and I picked up the facing floats thread. I will probably > remove the experimental code from mkiv and only work on the lmtx > implementation. The same can be true for streams. Many thanks for the new latest, Hans. I have compiled the sample from page-ffl.mkxl: \starttext \definefacingfloat [whatever] \setupfacingfloat [whatever] [style=bold, width=frame, offset=10pt, color=white] \setupfacingfloat [whatever:left] [background=color, backgroundcolor=red] \setupfacingfloat [whatever:right] [background=color, backgroundcolor=green] \startfacingfloat[whatever] {\dorecurse{10}{\samplefile{tufte} }} {\dorecurse{10}{\samplefile{ward} }} {\dorecurse{10}{\samplefile{tufte} }} {\dorecurse{10}{\samplefile{ward} }} \stopfacingfloat \startfacingfloat[whatever] \startcontent \dorecurse{10}{\samplefile{tufte} } \stopcontent \startcontent \dorecurse{10}{\samplefile{ward} } \stopcontent \startcontent \dorecurse{10}{\samplefile{tufte} } \stopcontent \startcontent \dorecurse{10}{\samplefile{ward} } \stopcontent \stopfacingfloat \dorecurse{10}{\samplefile{sapolsky} } \stoptext I’m afraid that the resulting PDF document only contains the text from Sapolsky (no facing floats). Sorry, but I have no idea about what I may be doing wrong (or whether there is an issue here). Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] dictionary example
On 6/13/2021 11:09 AM, jbf wrote: I worked out a solution - not quite what you are suggesting, but it works perfectly, and I can get ahead with the dictionary. 1st, I defined a paragraph based on subsubject. This enabled me to do away with the description I was using earlier and greatly simplifies each dictionary entry: \definehead[entry][subsubject] \setuphead [entry] [ number=no, textdistance=3pt, alternative=text, align=raggedright, style=\bf, before={\vskip 0.5\lineheight} ] 2nd, note the before={\vskip 0.5\lineheight}. A bit of a hack one has to admit, but it solves the problem of reducing the gap between each entry. Instead of using \vskip try to use blank because that also handles whitespace and unwanted breaks. \starttext \showmakeup[line,glue] \strut test \blank[line] \strut test \blank[line] \blank[back,halfline] \strut test \blank[back,halfline] \strut test \stoptext - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] dictionary example
I worked out a solution - not quite what you are suggesting, but it works perfectly, and I can get ahead with the dictionary. 1st, I defined a paragraph based on subsubject. This enabled me to do away with the description I was using earlier and greatly simplifies each dictionary entry: \definehead[entry][subsubject] \setuphead [entry] [ number=no, textdistance=3pt, alternative=text, align=raggedright, style=\bf, before={\vskip 0.5\lineheight} ] 2nd, note the before={\vskip 0.5\lineheight}. A bit of a hack one has to admit, but it solves the problem of reducing the gap between each entry. All good. Julian On 13/6/21 5:48 pm, Hans Hagen wrote: On 6/13/2021 1:52 AM, jbf wrote: Assuming that the default space before and after a head (e.g. subsubject) is something like \blank[2*big], if there is a way I can change that default behaviour just for that particular head, then I can solve my problem. Is there such a possibility? \definehead[mysubject][subject] and then set up mysubject differently \startmysubject[title={}] etc Hans - 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 : 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 ___
[NTG-context] dictionary example
I am wondering if someone has tried a two-column dictionary layout with ConTeXt. What is confounding me at the moment is the gap between entries in the columns. My MWE is below. Try as I may, I seem unable to get rid of those gaps! I obviously want each entry to follow on from the other. I'm obviously not doing things right! If someone has already set up a dictionary and has a model they could share I'd be grateful. I'm attaching a screenshot of the result from the code below. Julian -- \setuphead[subsubject][before=,after=] \definemarking[subsubject] \setupheadertexts [{\getmarking[subsubject][top]–\getmarking[subsubject][bottom]}][][{\getmarking[subsubject][top]–\getmarking[subsubject][bottom]}][] \setupcolumns[n=2,align=raggedright,balance=no,tolerance={verytolerant,stretch}] \definedescription[des][headstyle=bold,style=normal,alternative=serried, width=fit] \starttext \startsubject[title={A}] \startsubsubject[marking={Term 1}] \startcolumns \startdes{term 1}1. bla. 2. bla bla 3. bla bla bla. {\em adjective}. \textbullet\hskip 2pt \input weisman \rightarrow {\bf something else}. \stopdes \stopsubsubject \startsubsubject[marking={Term 2}] \startdes{term 2}1. bla. 2. bla bla 3. bla bla bla. {\em noun} \textbullet\hskip 2pt \input weisman \stopdes \stopsubsubject \startsubsubject[marking={Term 3}] \startdes{term 3}1. bla. 2. bla bla 3. bla bla bla. {\em noun} \textbullet\hskip 2pt \input weisman \stopdes \stopcolumns \stopsubsubject \stopsubject ___ 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] upload / some new math stuff
Hi Hans, I am not a font specialist and I use pagella and modern. I'm curious so I installed this new font in /home/viserion/LMTX/tex/texmf/fonts/opentype/public/newcomputermodern I tested your file and I get the following message Thank you Fabrice Running `lmtx' on `hans-33' with ``/home/viserion/LMTX/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context --autopdf --purgeall hans-33'' resolvers | formats | executing runner 'run luametatex format': /home/viserion/LMTX/tex/texmf-linux-64/bin/luametatex --jobname="hans-33" --fmt=/home/viserion/LMTX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/viserion/LMTX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:autopdf --c:currentrun=1 --c:fulljobname="./hans-33" --c:input="./hans-33" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall --c:texmfbinpath="/home/viserion/LMTX/tex/texmf-linux-64/bin" fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.06.10 23:13 LMTX fmt: 2021.6.11 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/home/viserion/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/home/viserion/LMTX/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname 'hans-33', input './hans-33', result 'hans-33' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './hans-33.tex' open source > level 2, order 3, name '/home/viserion/LMTX/tex/texmf-context/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv' close source> level 2, order 3, name '/home/viserion/LMTX/tex/texmf-context/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv' fonts > defining > forced type 'otf' of 'newcm10-regular' not found fonts > defining > unable to define 'newcm10-regular.otf' as 'newcomputermodern-12pt-rm-tf-0--0' fonts > defining > font with asked name 'newcmmath-regular' is not found using lookup 'file' fonts > defining > unable to define 'newcmmath-regular' as 'newcomputermodern-12pt-mm-mr--3' fonts > defining > unable to define 'newcmmath-regular' as 'newcomputermodern-12pt-mm-mr--2' fonts > defining > unable to define 'newcmmath-regular' as 'newcomputermodern-12pt-mm-mr--1' fonts > defining > unable to define 'newcmmath-regular' as 'newcomputermodern-12pt-mm-mb--3' fonts > defining > unable to define 'newcmmath-regular' as 'newcomputermodern-12pt-mm-mb--2' fonts > defining > unable to define 'newcmmath-regular' as 'newcomputermodern-12pt-mm-mb--1' tex error > tex error on line 12 in file ./hans-33.tex: Math error: parameter 'quad' in style 0 is not set \p_distance \endgroup \stopimath \p_distance \stopforceddisplaymath \egroup \d_strc_math_number_width \wd \b_strc_formulas_number \ifcase \mathnumberstatus \setfalse \c_strc_math_has_number \or \ifzeropt \d_strc_math_number_width \setfalse \c_strc_math_has_number \else \settrue \c_strc_math_has \p_distance \endgroup \ifcase \c_strc_formulas_mode \Ucheckedstopdisplaymath \or \normalUstopmath \egroup \strc_formulas_flush_content_and_number \else \expandafter \stopinnermath \fi \afterdisplayspace \egroup \p_distance \strc_formulas_place_number \strc_formulas_flush_number \dostarttagged \t!formulacontent \empty \dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter \c!alternative \v!formula \endcsname \dostoptagged \dostoptagged \nonoindentati \stopformula 2 % \setupbodyfont[cambria] 3 4 \starttext 5 6 \startformula 7 x = \integral^1_2 \mathinner{\vrule height 10mm depth 10mm width 5mm} = 8 x = \integral^1_2 \mathinner{\vrule height 20mm depth 20mm width 5mm} = 9 x = \integral^1_2 \mathinner{\vrule height 30mm depth 30mm width 5mm} = 10 x = \integral^1_2 \mathinner{x} = 11 x = \integral^1_2 x 12 >> \stopformula 13 14 \startformula 15 x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 10mm depth 16 10mm width 5mm} = 17 x = \int\Umathadaptsize^1_2 \mathinner{\vrule height 20mm depth 18 20mm width 5mm} =
Re: [NTG-context] Calculating Best Box Width?
On 6/9/2021 7:30 PM, Michael Urban wrote: I am not especially facile with ConTeXt, and it has been years since I did anything complex with TeX, so I am hoping someone could help me with this. The following is probably not great code, but it shows what I am trying to do. The problems are twofold: a benign problem is that I get underfull hbox errors (\dontcomplain notwithstanding). But the other problem is that with text of a certain size, the final line is much shorter than the others. Is there some clever way to repeatedly typeset the text (e.g., put it in an hbox, measure the width, and repeatedly try .5, .333, .25 of the hbox width until it fits in the allocated space)? How to go about this? \defineblank[EpigraphDistance][3pt] \definestartstop[EpigraphText][ style=\ssa, before={\blank[EpigraphDistance] \setupnarrower[left=.25\textwidth,right=0pt] \startnarrower[left,right] \setupalign[flushright,nothyphenated,broad] \dontcomplain \noindent}, after={\stopalignment\stopnarrower \blank[EpigraphDistance] \indenting[next]}] \long\def\epigraph#1#2#3{% \startEpigraphText #1 \par \stopEpigraphText \ifx\hfuzz#3\hfuzz \rightaligned{\ssa\sl --- #2} \else \rightaligned{\ssa\sl --- #2, \tf\ssa\symbol[leftquote]#3\symbol[rightquote]} \fi } \starttext Testing epigraph \epigraph{% para \quotation{My birthday-present!} he whispered to himself, as he had often done in the endless dark days. \quotation{That's what we\unknown} }{J.R.R. Tolkien}{The Hobbit} That was an epigraph. \stoptext I assume that when you see some trickery that you can do the rest yourself. \starttext First we typeset the box ad one line and then flush it in a vertical box (paragraph). We can of course also typeset each time. When we're okay with the fit (naturalwidth == less than max width) we quit. We can assume that spaces have enough stretch to deal with the close fit. \protected\def\makeitfit#1#2#3% {\begingroup \hsize#1\relax \setbox\scratchboxone\hbox\bgroup#3\egroup \doloop {% \setbox\scratchboxtwo\vbox\bgroup\unhcopy\scratchboxone\egroup \scratchdimenone\boxlinenw\scratchboxtwo\boxlines\scratchboxtwo \scratchdimentwo\boxlinewd\scratchboxtwo\boxlines\scratchboxtwo \ifdim\scratchdimenone<\scratchdimentwo \advance\hsize-#2\relax \else \unhbox\scratchboxone \exitloop \fi }% \endgroup} This variant is more neat as it returns the to b eused width. It doesn't flush the content. \protected\def\guessbestwidth#1#2#3% no \protected when no \dimexpr {\beginlocalcontrol \begingroup \hsize#1\relax \setbox\scratchboxone\hbox\bgroup#3\egroup \doloop {% \setbox\scratchboxtwo\vbox\bgroup\unhcopy\scratchboxone\egroup \scratchcounter\boxlines\scratchboxtwo % n of lines \scratchdimenone\boxlinenw\scratchboxtwo\scratchcounter \scratchdimentwo\boxlinewd\scratchboxtwo\scratchcounter \ifdim\scratchdimenone<\scratchdimentwo \advance\hsize-#2\relax \else \exitloop \fi }% % \normalexpanded{\endgroup\endlocalcontrol\the\hsize}} \normalexpanded{\endgroup\endlocalcontrol\dimexpr\the\hsize\relax}} Here are some tests: \makeitfit{10cm}{1mm}{\input{ward}} \hsize \guessbestwidth{10cm}{1mm}{\input{ward}} \input{ward} \the\guessbestwidth{10cm}{1mm}{\input{ward}} \stoptext The mechanisms used are relatively simple: - good old tex primitives - few scratch registers - a loop that we quit - the boxlines mechanism discussed in some manual (i admit that i already had forgotten about it) - and in the last example some local processing magic which makes sure that all these calculations are unseen One can then of course try to make it more compact: \protected\def\guessbestwidth#1#2#3% {\beginlocalcontrol \begingroup \hsize#1\relax \setbox\scratchboxone\hbox\bgroup#3\egroup \doloop {% \setbox\scratchboxtwo\vbox\bgroup\unhcopy\scratchboxone\egroup \scratchcounter\boxlines\scratchboxtwo \ifdim\boxlinenw\scratchboxtwo\scratchcounter<\boxlinewd\scratchboxtwo\scratchcounter \advance\hsize-#2\relax \else \exitloop \fi }% \normalexpanded{\endgroup\endlocalcontrol\dimexpr\the\hsize\relax}} And of course you now need to wikify it. Hans - 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 : http://
[NTG-context] Calculating Best Box Width?
I am not especially facile with ConTeXt, and it has been years since I did anything complex with TeX, so I am hoping someone could help me with this. The following is probably not great code, but it shows what I am trying to do. The problems are twofold: a benign problem is that I get underfull hbox errors (\dontcomplain notwithstanding). But the other problem is that with text of a certain size, the final line is much shorter than the others. Is there some clever way to repeatedly typeset the text (e.g., put it in an hbox, measure the width, and repeatedly try .5, .333, .25 of the hbox width until it fits in the allocated space)? How to go about this? \defineblank[EpigraphDistance][3pt] \definestartstop[EpigraphText][ style=\ssa, before={\blank[EpigraphDistance] \setupnarrower[left=.25\textwidth,right=0pt] \startnarrower[left,right] \setupalign[flushright,nothyphenated,broad] \dontcomplain \noindent}, after={\stopalignment\stopnarrower \blank[EpigraphDistance] \indenting[next]}] \long\def\epigraph#1#2#3{% \startEpigraphText #1 \par \stopEpigraphText \ifx\hfuzz#3\hfuzz \rightaligned{\ssa\sl --- #2} \else \rightaligned{\ssa\sl --- #2, \tf\ssa\symbol[leftquote]#3\symbol[rightquote]} \fi } \starttext Testing epigraph \epigraph{% para \quotation{My birthday-present!} he whispered to himself, as he had often done in the endless dark days. \quotation{That's what we\unknown} }{J.R.R. Tolkien}{The Hobbit} That was an epigraph. \stoptext ___ 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] randomizer line-breaking
> Am 08.06.2021 um 15:01 schrieb Hans Hagen : > > On 6/8/2021 12:18 PM, Steffen Wolfrum wrote: >>> Am 07.06.2021 um 17:59 schrieb Hans Hagen : >>> >>> On 6/7/2021 5:44 PM, Steffen Wolfrum wrote: >>>>> Am 07.06.2021 um 16:39 schrieb Hans Hagen : >>>>> >>>>> Not that I know of ... but you can run wiht --keeptuc and see if there >>>>> are differences in the tuc file that create some oscillation. >>>> Ok. Each run now creates 4 additional files: >>>> file_name-tuc-02.tmp >>>> file_name-tuc-03.tmp >>>> file_name-tuc-04.tmp >>>> file_name-tuc-05.tmp >>>> Is this right? >>> indeed and you can compare them to get some clue about what changes >>> >>> normally you get one so your style somehow triggers differences >> Besides plenty of numbers that differ, there are also entire lines that >> differ: >> One frequent difference for examples is line 2 (macros) and 3 (randomseed) >> in this: >> utilitydata.job.variables.collected={ >> ["macros"]={}, >> ["randomseed"]=0x1.c14cd54cp-1, >> ["sectionblockorder"]={ "frontpart", "bodypart", "backpart" }, > that randomseed should be the same between runs (unless one wipes the tuc > file) so are you doing something with random? not that I know of. I searched through both, the project folder and my modules (in context standalone), both «random» nowhere was to be found. perhaps I incidently use a command that utilizes random... what could this be? ___ 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] randomizer line-breaking
On 6/8/2021 12:18 PM, Steffen Wolfrum wrote: Am 07.06.2021 um 17:59 schrieb Hans Hagen : On 6/7/2021 5:44 PM, Steffen Wolfrum wrote: Am 07.06.2021 um 16:39 schrieb Hans Hagen : Not that I know of ... but you can run wiht --keeptuc and see if there are differences in the tuc file that create some oscillation. Ok. Each run now creates 4 additional files: file_name-tuc-02.tmp file_name-tuc-03.tmp file_name-tuc-04.tmp file_name-tuc-05.tmp Is this right? indeed and you can compare them to get some clue about what changes normally you get one so your style somehow triggers differences Besides plenty of numbers that differ, there are also entire lines that differ: One frequent difference for examples is line 2 (macros) and 3 (randomseed) in this: utilitydata.job.variables.collected={ ["macros"]={}, ["randomseed"]=0x1.c14cd54cp-1, ["sectionblockorder"]={ "frontpart", "bodypart", "backpart" }, that randomseed should be the same between runs (unless one wipes the tuc file) so are you doing something with random? Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] randomizer line-breaking
> Am 07.06.2021 um 17:59 schrieb Hans Hagen : > > On 6/7/2021 5:44 PM, Steffen Wolfrum wrote: >>> Am 07.06.2021 um 16:39 schrieb Hans Hagen : >>> >>> Not that I know of ... but you can run wiht --keeptuc and see if there are >>> differences in the tuc file that create some oscillation. >> Ok. Each run now creates 4 additional files: >> file_name-tuc-02.tmp >> file_name-tuc-03.tmp >> file_name-tuc-04.tmp >> file_name-tuc-05.tmp >> Is this right? > indeed and you can compare them to get some clue about what changes > > normally you get one so your style somehow triggers differences Besides plenty of numbers that differ, there are also entire lines that differ: One frequent difference for examples is line 2 (macros) and 3 (randomseed) in this: utilitydata.job.variables.collected={ ["macros"]={}, ["randomseed"]=0x1.c14cd54cp-1, ["sectionblockorder"]={ "frontpart", "bodypart", "backpart" }, Another difference that pops up 1000 times is this line ["used"]="fit", in situation like this: utilitydata.structures.references.collected={ ["02"]={ ["*101"]={ ["metadata"]=678, ["references"]={ ["block"]="bodypart", ["internal"]=102, ["prefix"]="02", ["realpage"]=16, ["reference"]="*101", ["section"]=3, ["used"]="fit", ["view"]="fit", ["x"]=25526152, ["y"]=36448045, }, }, Does this help? PS: The entire problem began when I started using hyphenation-exceptions... Steffen ___ 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] randomizer line-breaking
On 6/7/2021 5:44 PM, Steffen Wolfrum wrote: Am 07.06.2021 um 16:39 schrieb Hans Hagen : Not that I know of ... but you can run wiht --keeptuc and see if there are differences in the tuc file that create some oscillation. Ok. Each run now creates 4 additional files: file_name-tuc-02.tmp file_name-tuc-03.tmp file_name-tuc-04.tmp file_name-tuc-05.tmp Is this right? indeed and you can compare them to get some clue about what changes normally you get one so your style somehow triggers differences - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 5/31/2021 9:04 PM, Aditya Mahajan wrote: On Mon, 31 May 2021, Hans Hagen wrote: On 5/31/2021 6:50 PM, Aditya Mahajan wrote: On Mon, 31 May 2021, Hans Hagen wrote: Hi, I uploaded a new lmtx version. This time a new mechanism. This is very interesting...I haven't played around with it, but is it the case that \markanchor does not do alignment and so can completely replace the old \hpos{...} class of macros? This also gives many interesting possibilities for math drawing "boxes" in matrices (e.g., https://tex.stackexchange.com/questions/333011/draw-a-box-around-matrix-elements) or even the nath style `\wall` macro (see pg 11 of https://texdoc.org/serve/nathguide.pdf/0) ... Of course, I mean this in terms of the visual effect and not the interface. Like this ... I'll think about taking some size into account (a bit like hpos does). Yes! If we can take size of cell into account, it will be perfect. We can also think of a wrapper so that an explicit \framed is not needed. new upload with nesxt step \starttext \startuseMPgraphic{whatever-5} fill OverlayBox withcolor "lightgray" ; draw matrixbox (1, 1) (2, 1) withpen pencircle scaled 1pt withcolor "blue" ; draw matrixbox (2, 2) (4, 4) withpen pencircle scaled 1pt withcolor "red" ; % drawdot anchorxy("matrix", 3, 4) withpen pencircle scaled 4pt withcolor "green"; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[whatever-5][\useMPgraphic{whatever-5}] \framed [synchronize=background, align=normal, frame=off, background=whatever-5] {\setmathmatrixanchoring[both]% left|right|both|yes % {\setmathmatrixanchoring[right]% left|right|both|yes \startmathmatrix \NC a1 \NC a \NC b \NC c\NR \NC a2 \NC a \NC b \NC c\NR \NC a3 \NC a^2 \NC b \NC c\NR \NC a4 \NC a \NC b_2 \NC c\NR \NC a5 \NC a \NC b \NC c\NR \NC a6 \NC a \NC b \NC c\NR \stopmathmatrix} \blank \startuseMPgraphic{whatever-5} fill OverlayBox withcolor "darkgray" ; draw matrixbox (1, 1) (2, 1) enlarged OverlayOffset shifted paired(OverlayOffset) withpen pencircle scaled 1pt withcolor "blue" ; draw matrixbox (2, 2) (4, 4) enlarged OverlayOffset shifted paired(OverlayOffset) withpen pencircle scaled 1pt withcolor "red" ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \framed [synchronize=background, align=normal, frame=off, background=whatever-5, backgroundoffset=.5ex, foregroundcolor=white] {\setmathmatrixanchoring[yes]% left|right|both|yes \startmathmatrix \NC a1 \NC a \NC b \NC c\NR \NC a2 \NC a \NC b \NC c\NR \NC a3 \NC a^2 \NC b \NC c\NR \NC a4 \NC a \NC b_2 \NC c\NR \NC a5 \NC a \NC b \NC c\NR \NC a6 \NC a \NC b \NC c\NR \stopmathmatrix} \stoptext as a side track / distraction I added italic correction prevention, as shown in: \starttext \startTEXpage[offset=10pt] \showglyphs \startcombination[nx=3,ny=1] \startcontent \framed[strut=no,align=normal,offset=1ex]\bgroup \showmakeup[math,kern]% $a = b + c$\par $b = c + d$\par $c = e + f$\par \egroup \stopcontent \startcaption italic correction \stopcaption \startcontent \framed[strut=no,align=normal,offset=1ex]\bgroup \showmakeup[math,kern]% \noitaliccorrection $a = b + c$\par $b = c + d$\par $c = e + f$\par \egroup \stopcontent \startcaption no italic correction \stopcaption \startcontent \framed[strut=no,align=normal,offset=1ex]\bgroup \showmakeup[math,kern]% $a = b + c$\par $\noitaliccorrection b = c + d$\par $c = e + f$\par \egroup \stopcontent \startcaption selected correction \stopcaption \stopcombination \stopTEXpage \stoptext but of course different width are still a reason why this doesn't align Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On Mon, 31 May 2021, Hans Hagen wrote: > On 5/31/2021 6:50 PM, Aditya Mahajan wrote: > > On Mon, 31 May 2021, Hans Hagen wrote: > > > > > Hi, > > > > > > I uploaded a new lmtx version. This time a new mechanism. > > > > This is very interesting...I haven't played around with it, but is it the > > case that \markanchor does not do alignment and so can completely replace > > the old \hpos{...} class of macros? > > > > This also gives many interesting possibilities for math drawing "boxes" > > in matrices (e.g., > > https://tex.stackexchange.com/questions/333011/draw-a-box-around-matrix-elements) > > or even the nath style `\wall` macro (see pg 11 of > > https://texdoc.org/serve/nathguide.pdf/0) ... Of course, I mean this in > > terms of the visual effect and not the interface. > Like this ... I'll think about taking some size into account (a bit like hpos > does). Yes! If we can take size of cell into account, it will be perfect. We can also think of a wrapper so that an explicit \framed is not needed. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 5/31/2021 6:50 PM, Aditya Mahajan wrote: On Mon, 31 May 2021, Hans Hagen wrote: Hi, I uploaded a new lmtx version. This time a new mechanism. This is very interesting...I haven't played around with it, but is it the case that \markanchor does not do alignment and so can completely replace the old \hpos{...} class of macros? This also gives many interesting possibilities for math drawing "boxes" in matrices (e.g., https://tex.stackexchange.com/questions/333011/draw-a-box-around-matrix-elements) or even the nath style `\wall` macro (see pg 11 of https://texdoc.org/serve/nathguide.pdf/0) ... Of course, I mean this in terms of the visual effect and not the interface. Like this ... I'll think about taking some size into account (a bit like hpos does). \starttext \startuseMPgraphic{whatever-1} fill OverlayBox withcolor "lightgray" ; drawdot anchorxy("one", 0, 1) withpen pencircle scaled 1mm withcolor "red" ; drawdot anchorxy("one", 0, 2) withpen pencircle scaled 1mm withcolor "red" ; drawdot anchorxy("two", 0, 1) withpen pencircle scaled 1mm withcolor "red" ; drawdot anchorxy("two", 0, 2) withpen pencircle scaled 1mm withcolor "red" ; drawdot anchorxy("three", 0, 1) withpen pencircle scaled 1mm withcolor "red" ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \startuseMPgraphic{whatever-2} pair a ; a := anchorxy("one", 0, 1) ; pair b ; b := anchorxy("one", 0, 2) ; drawarrow anchorxy("one", 0, 1) { right } .. anchorxy("one", 0, 2) withcolor "blue" withtransparency (1,.75) ; drawarrow anchorxy("two", 0, 1) { down } .. anchorxy("two", 0, 2) withcolor "blue" withtransparency (1,.75) ; drawarrow anchorxy("two", 0, 1) { dir 30 } .. anchorxy("three", 0, 1) withcolor "blue" withtransparency (1,.75) ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[whatever-1][\useMPgraphic{whatever-1}] \defineoverlay[whatever-2][\useMPgraphic{whatever-2}] \framed [synchronize=yes, align=normal, offset=10pt, frame=off, background={whatever-1,foreground,whatever-2}] {\startmathmatrix \NC \markanchor{two}{0}{1}a \NC b \NC c\NR \NC a \NC b \NC c\NR \NC a \NC \markanchor{one}{0}{1}b \NC c\NR \NC \markanchor{one}{0}{2}a \NC b \NC \markanchor{two}{0}{2}c\NR \NC a \NC \markanchor{three}{0}{1}b \NC c\NR \stopmathmatrix} \startuseMPgraphic{whatever-3} pair a ; a := anchorxy("a", 0, 1) ; pair b ; b := anchorxy("a", 0, 2) ; draw boundingbox (a--b) leftenlarged .25EmWidth rightenlarged EmWidth topenlarged StrutHeight bottomenlarged .5StrutDepth withcolor "blue" withtransparency (1,.75) ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[whatever-3][\useMPgraphic{whatever-3}] \framed [synchronize=yes, align=normal, offset=10pt, frame=off, background=whatever-3] {\startmathmatrix \NC a \NC a \NC b \NC c\NR \NC a \NC a \NC b \NC c\NR \NC a \NC \markanchor{a}{0}{1}a \NC b \NC c\NR \NC a \NC a \NC \markanchor{a}{0}{2}b \NC c\NR \NC a \NC a \NC b \NC c\NR \NC a \NC a \NC b \NC c\NR \stopmathmatrix} \stoptext The \markanchor{a}{0}{1 can be wrapped in a simpler one, or we can have something \markedanchor{a}{2}{b} but that need a little thinking because we don't want to mess too much with math spacing. Actually we can consider (in this case) \MC[a,2] or so although these are probabbly not features used that often. Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On 5/31/2021 6:50 PM, Aditya Mahajan wrote: On Mon, 31 May 2021, Hans Hagen wrote: Hi, I uploaded a new lmtx version. This time a new mechanism. This is very interesting...I haven't played around with it, but is it the case that \markanchor does not do alignment and so can completely replace the old \hpos{...} class of macros? as long as you work within a predictable namespace and box/unbox situation This also gives many interesting possibilities for math drawing "boxes" in matrices (e.g., https://tex.stackexchange.com/questions/333011/draw-a-box-around-matrix-elements) or even the nath style `\wall` macro (see pg 11 of https://texdoc.org/serve/nathguide.pdf/0) ... Of course, I mean this in terms of the visual effect and not the interface. ah ... http://www.tug.org/tug2003/preprints/Bilotta/bilotta2.pdf Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] new upload
On Mon, 31 May 2021, Hans Hagen wrote: > Hi, > > I uploaded a new lmtx version. This time a new mechanism. This is very interesting...I haven't played around with it, but is it the case that \markanchor does not do alignment and so can completely replace the old \hpos{...} class of macros? This also gives many interesting possibilities for math drawing "boxes" in matrices (e.g., https://tex.stackexchange.com/questions/333011/draw-a-box-around-matrix-elements) or even the nath style `\wall` macro (see pg 11 of https://texdoc.org/serve/nathguide.pdf/0) ... Of course, I mean this in terms of the visual effect and not the interface. Thanks, 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] BibTeX inproceedings entries not rendered correctly in APA style
On 5/28/2021 16:33, Alan Braslau wrote: On Fri, 28 May 2021 19:52:19 - (UTC) Nicola wrote: If there is no publisher, then @unpublished is a better category. APA explicitly, and for good reason, accounts for self-publishing, indicating that the Author was the publisher. Ah ok, that explains the output I was obtaining. So, I am using the wrong bibliographic style for my purposes. In practice, at least in Computer Science, publishers (and also editors) are often omitted in references (it's more a "don't care", rather than a "don't know" thing, though). If a publisher does not exist, was it published? If the publisher is unknown, then why not state that: publisher="unknown publisher", or whatever? Strictly speaking, your reasoning makes perfect sense, and I am all for enforcing constraints if a given bibliographic style requires them. But then, there might be alternatives for when one does not need to adhere to those styles. Does ConTeXt (LMTX) currently provide anything else besides apa and aps? I have read the BibTeX manual looong time ago, but I remember that there were mandatory and optional fields for each reference type. My memory may fail me, but I think that Editor and Publisher were not mandatory fields for inproceedings and article (I think Publisher is mandatory for book). Is there a bibliographic style in ConTeXt that follows those rules? Bibliography management is very sophisticated in ConTeXt (much more than LaTeX) and I have not grasped all of its details yet. It seems to me that it has also evolved quite a bit in recent years. So, the "ConTeXt way" of doing bibliographies still eludes me to some extent. In writing the ConTeXt bibliography system, we tried to base this on references, indeed following the original bibtex manual for its definitions. The APA style follows the APA style guide as best as possible. The APS style is intended as a simple example of a numbered bibliography minimalist style. Multiple other styles exist out there, more or less well defined. The problem is that most of them are not very rigorous, and they are greatly abused. Many publishers follow their own (quirky) bibliography styles. The Context system started out as sort of a database handling subsystem, useful in publishing. It is entirely tune-able, through setups and parameters. However, the system is complex, so the customization is not quite as easy as originally intended. Note that the original bibtex system was conceived in order to have this configurability, however few were those who mastered writing bibliography styles, and even carefully crafted styles, for example as implemented by the APS RevTeX, were buggy and had a number of known, serious limitations requiring manual intervention. We could, and have had the intention of, writing other bibliography styles. But there must be a motivation as well as a clearly defined specification, for otherwise we will be heading down a rabbit hole of differing expectations and endless tweaking. As to "don't care" concerning publishers, this is not very academic. Indeed, many famous books have been published by various publishers, in particular for different markets. It is important to say, for each one might be slightly different, have different pagination for example, and even certain edits of the text. One might also not pay attention to the edition, but this too can lead to major differences (even, and especially in computer science). Thomas Schmitz, one of the originators of the bibliography project, will tell you to take the APA style as a model, and then modify it as you wish to your own needs. I further took this to heart, trying to write the macros as somewhat standard definitions that one could modify as needed without breaking the entire system. And then there are clearly bugs that can be fixed. In the case of a missing publisher, it is not simply left blank because the APA style explicitly tells us to put "Author" when there is no defined publisher, so this is a feature, not a bug. Alan The APA does not attempt to define bibliographies. It defines reference lists (and more specifically, reference lists for APA journal articles), and there is a difference. The reference list, as defined in the APA guide, simply exists to point the reader to the cited document (whatever 'document' might mean). Bibliographies, as the APA guide acknowledges, can be much richer, although they do not say it that way. Looking at the 6th edition of the APA guide (I have not reviewed the 7th edition guide, but as far as I know ConTeXt used the 6th edition), I note that example 36, a symposium contribution, does not have a publisher name. However, it does appear that ConTeXt would require a publisher for this and the following examples which have a DOI but no publisher. This may be an error, but whether on the part of the APA or ConTeXt or both I cann
Re: [NTG-context] BibTeX inproceedings entries not rendered correctly in APA style
On Fri, 28 May 2021 19:52:19 - (UTC) Nicola wrote: > > If there is no publisher, then @unpublished is a better category. > > APA explicitly, and for good reason, accounts for self-publishing, > > indicating that the Author was the publisher. > > Ah ok, that explains the output I was obtaining. So, I am using the > wrong bibliographic style for my purposes. In practice, at least in > Computer Science, publishers (and also editors) are often omitted in > references (it's more a "don't care", rather than a "don't know" > thing, though). > > > If a publisher does not exist, was it published? > > > > If the publisher is unknown, then why not state that: > > publisher="unknown publisher", or whatever? > > Strictly speaking, your reasoning makes perfect sense, and I am all > for enforcing constraints if a given bibliographic style requires > them. But then, there might be alternatives for when one does not > need to adhere to those styles. Does ConTeXt (LMTX) currently provide > anything else besides apa and aps? > > I have read the BibTeX manual looong time ago, but I remember that > there were mandatory and optional fields for each reference type. My > memory may fail me, but I think that Editor and Publisher were not > mandatory fields for inproceedings and article (I think Publisher is > mandatory for book). Is there a bibliographic style in ConTeXt that > follows those rules? > > Bibliography management is very sophisticated in ConTeXt (much more > than LaTeX) and I have not grasped all of its details yet. It seems > to me that it has also evolved quite a bit in recent years. So, the > "ConTeXt way" of doing bibliographies still eludes me to some extent. In writing the ConTeXt bibliography system, we tried to base this on references, indeed following the original bibtex manual for its definitions. The APA style follows the APA style guide as best as possible. The APS style is intended as a simple example of a numbered bibliography minimalist style. Multiple other styles exist out there, more or less well defined. The problem is that most of them are not very rigorous, and they are greatly abused. Many publishers follow their own (quirky) bibliography styles. The Context system started out as sort of a database handling subsystem, useful in publishing. It is entirely tune-able, through setups and parameters. However, the system is complex, so the customization is not quite as easy as originally intended. Note that the original bibtex system was conceived in order to have this configurability, however few were those who mastered writing bibliography styles, and even carefully crafted styles, for example as implemented by the APS RevTeX, were buggy and had a number of known, serious limitations requiring manual intervention. We could, and have had the intention of, writing other bibliography styles. But there must be a motivation as well as a clearly defined specification, for otherwise we will be heading down a rabbit hole of differing expectations and endless tweaking. As to "don't care" concerning publishers, this is not very academic. Indeed, many famous books have been published by various publishers, in particular for different markets. It is important to say, for each one might be slightly different, have different pagination for example, and even certain edits of the text. One might also not pay attention to the edition, but this too can lead to major differences (even, and especially in computer science). Thomas Schmitz, one of the originators of the bibliography project, will tell you to take the APA style as a model, and then modify it as you wish to your own needs. I further took this to heart, trying to write the macros as somewhat standard definitions that one could modify as needed without breaking the entire system. And then there are clearly bugs that can be fixed. In the case of a missing publisher, it is not simply left blank because the APA style explicitly tells us to put "Author" when there is no defined publisher, so this is a feature, not a bug. Alan ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On 2021-05-28, Alan Braslau wrote: > On Fri, 28 May 2021 13:02:10 -0400 (EDT) > Aditya Mahajan wrote: > >> > If you have not defined a publisher, how should ANY format place the >> > undefined publisher's name? >> >> Simply leave it blank? > > If there is no publisher, then @unpublished is a better category. APA > explicitly, and for good reason, accounts for self-publishing, > indicating that the Author was the publisher. Ah ok, that explains the output I was obtaining. So, I am using the wrong bibliographic style for my purposes. In practice, at least in Computer Science, publishers (and also editors) are often omitted in references (it's more a "don't care", rather than a "don't know" thing, though). > If a publisher does not exist, was it published? > > If the publisher is unknown, then why not state that: > publisher="unknown publisher", or whatever? Strictly speaking, your reasoning makes perfect sense, and I am all for enforcing constraints if a given bibliographic style requires them. But then, there might be alternatives for when one does not need to adhere to those styles. Does ConTeXt (LMTX) currently provide anything else besides apa and aps? I have read the BibTeX manual looong time ago, but I remember that there were mandatory and optional fields for each reference type. My memory may fail me, but I think that Editor and Publisher were not mandatory fields for inproceedings and article (I think Publisher is mandatory for book). Is there a bibliographic style in ConTeXt that follows those rules? Bibliography management is very sophisticated in ConTeXt (much more than LaTeX) and I have not grasped all of its details yet. It seems to me that it has also evolved quite a bit in recent years. So, the "ConTeXt way" of doing bibliographies still eludes me to some extent. Nicola ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On Fri, 28 May 2021 13:02:10 -0400 (EDT) Aditya Mahajan wrote: > > If you have not defined a publisher, how should ANY format place the > > undefined publisher's name? > > Simply leave it blank? If there is no publisher, then @unpublished is a better category. APA explicitly, and for good reason, accounts for self-publishing, indicating that the Author was the publisher. This is why it works that way. If a publisher does not exist, was it published? If the publisher is unknown, then why not state that: publisher="unknown publisher", or whatever? Alan ___ 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] styling references
Dear list, I have the following sample: \starttext \startitemize \dorecurse{15} {\item[\recurselevel]whatever} \stopitemize As exposed in \in{item}[9]... \stoptext How can I add style to the item reference (9)? I mean, how can I get “As exposed in item {\em 9}”? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On Fri, 28 May 2021, Alan Braslau wrote: > On Thu, 27 May 2021 20:21:55 - (UTC) > Nicola wrote: > > > Thank you all for the precious comments. > > > > The current LMTX appears to have almost fixed my issue, except that > > inproceedings entries without a publisher have the text "Author" > > instead of the publisher's name. > > > > I must say that I have no requirement to use the APA style > > specifically; I do it only because it uses the format (Name, Year) > > for the citation. I guess that I could use another style (aps seems > > fine) and just customize the citation format. I have tried with > > > > \usebtxdataset[main.bib] > > \setupbtx[default:cite][alternative=authoryear] > > \usebtxdefinitions[aps] > > > > but it seems that the setup command has no effect: the citations still > > use numbers. > > APS is an inherently numbered citation format. > > If you have not defined a publisher, how should ANY format place the > undefined publisher's name? Simply leave it blank? 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] LMTX and my custom typescripts
Yesterday I installed a new LMTX instance *ex nihilo*. Unfortunately, the new instance will not load my typescripts. My several commercial fonts and the typescripts I wrote for them reside in the texmf-project tree, along with a style file that loads them. I load the style file in my source files with the \environment command. The files in texmf-project are properly indexed. I know this, because the style file's name appears in the log, because I can list the fonts with mtxrun --script fonts --list --files --all --pattern=Dolly*, and because he style file evokes \showframe and \showgrid; the result of which I see in the typeset results. Regardless of whether a typescript files, e.g. type-DollyPro.tex, is in the texmf-tree or in the same directory as the ConTeXt source file, evoking \usetypescriptfile[type-DollyPro] fails. The log says: fonts > typescripts > unknown library 'DollyPro' fonts > typescripts > unknown library 'DollyPro' However, including the typescripts in the ConTeXt source file succeeds; which would seem to imply that my typescript definitions are correct. Using an old instance: LMTX LuaTeX 2.03 20191227 + ConTeXt MkIV 2019.12.27 19:26, loading the typescript via the style file works as expected. I regret that my mwe remains academic, since you need the Dolly font to run it. Any encouragement in how to resolve this would be much appreciated. Cheers, Michael % \starttypescript [serif] [DollyPro] % \definefontsynonym [Regular] [file:DollyPro-Regular.otf] % \definefontsynonym [Bold] [file:DollyPro-Bold.otf] % \definefontsynonym [Italic][file:DollyPro-RegularItalic.otf] % \definefontsynonym [SmallCaps] [file:DollyPro-RegularSmallCaps.otf] % \stoptypescript % \starttypescript [serif] [DollyPro] % \setups[font:fallback:serif] % \definefontsynonym [Serif] [Regular] [features=default] % \definefontsynonym [SerifBold] [Bold] [features=default] % \definefontsynonym [SerifItalic] [Italic][features=default] % \definefontsynonym [SerifCaps] [SmallCaps] [features=default] % \stoptypescript % \definefontfeature % [hz] [default] % [protrusion=quality, expansion=quality, mode=node, script=latn] % \starttypescript[DollyPro] % \definetypeface [DollyPro] [rm] [serif] [DollyPro] [default] [features=hz] % \stoptypescript \usetypescriptfile[type-DollyPro] \setupbodyfont[DollyPro] \starttext \input tufte \stoptext% Regular \starttypescript [serif] [DollyPro] \definefontsynonym [Regular] [file:DollyPro-Regular.otf] \definefontsynonym [Bold] [file:DollyPro-Bold.otf] \definefontsynonym [Italic][file:DollyPro-RegularItalic.otf] \definefontsynonym [SmallCaps] [file:DollyPro-RegularSmallCaps.otf] \stoptypescript \starttypescript [serif] [DollyPro] \setups[font:fallback:serif] \definefontsynonym [Serif] [Regular] [features=default] \definefontsynonym [SerifBold] [Bold] [features=default] \definefontsynonym [SerifItalic] [Italic][features=default] \definefontsynonym [SerifCaps] [SmallCaps] [features=default] \stoptypescript \definefontfeature [hz] [default] [protrusion=quality, expansion=quality, mode=node, script=latn] \starttypescript[DollyPro] \definetypeface [DollyPro] [rm] [serif] [DollyPro] [default] [features=hz] \stoptypescript % finis fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.05.27 14:15 LMTX fmt: 2021.5.28 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/opt/_lmtx_/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/opt/_lmtx_/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname 'mwe', input './mwe', result 'mwe' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './mwe.tex' fonts > typescripts > unknown library 'DollyPro' fonts > typescripts > unknown library 'DollyPro' fonts > preloading latin modern fonts (third stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 2, order 3, name 'tufte.tex' close source> level 2, order 3, name 'tufte.tex' backend > xmp > using file '/opt/_lmtx_/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 close source> level 1, order 3, name './mwe.tex' system > start used files system > text: mwe s
Re: [NTG-context] BibTeX inproceedings entries not rendered correctly in APA style
On Thu, 27 May 2021 20:21:55 - (UTC) Nicola wrote: > Thank you all for the precious comments. > > The current LMTX appears to have almost fixed my issue, except that > inproceedings entries without a publisher have the text "Author" > instead of the publisher's name. > > I must say that I have no requirement to use the APA style > specifically; I do it only because it uses the format (Name, Year) > for the citation. I guess that I could use another style (aps seems > fine) and just customize the citation format. I have tried with > > \usebtxdataset[main.bib] > \setupbtx[default:cite][alternative=authoryear] > \usebtxdefinitions[aps] > > but it seems that the setup command has no effect: the citations still > use numbers. APS is an inherently numbered citation format. If you have not defined a publisher, how should ANY format place the undefined publisher's name? I'm not sure what you want. Alan ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On 2021-05-25, Alan Braslau wrote: > On Mon, 24 May 2021 23:10:34 -0400 > Rik Kabel wrote: > >> >> On 5/24/2021 22:12, Alan Braslau wrote: >> > On Mon, 24 May 2021 17:53:49 -0400 >> > Rik Kabel wrote: >> > >> >> This is intended. Or rather, it is a side-effect of the intended >> >> behavior. >> >> >> >> If you add an editor ("editor={Baz, Bar}") you will get something >> >> like: >> >> >> >> Foo, B. (1983). Title of the paper. In B. Baz (Ed.), >> >> /Booktitle/. Author. >> >> >> >> And if you then add a publisher ("publisher={Paymefirst}") you will >> >> get: >> >> >> >> Foo, B. (1983). Title of the paper. In B. Bar (Ed.), >> >> Booktitle. Paymefirst. >> >> >> >> The APA presumes that you have both an editor and a publisher for >> >> pieces contained in other works. It calls for the use of the author >> >> as publisher if no publisher is present. It is silent about what to >> >> do if you have no editor. >> > It looks like a missing editor field should be caught. What should >> > the rule be? >> > >> > Actually, @inproceedings should not be used without an editor - >> > makes no sense. If the author of the paper happens to be the >> > editor, then the .bib data file should define this with an editor= >> > field. >> > >> > We can change the behavior if a clear case can be made as to what >> > fallback would make sense. Keep in mind the dictum: "garbage >> > in/garbage out"... >> > >> > Alan >> >> For the case of works within works (inproceedings, inbook, >> incollection, perhaps conference) I would think that the simplest >> solution is to simply drop it, so that in the example above one would >> simply get: >> >> Foo, B. (1983). Title of the paper. In /Booktitle/. Paymefirst. >> >> Although I do think that, at least for inproceedings, lack of an >> editor should at least be flagged. A simple compilation of works may >> have no named editor, of I see no reason to require it for inbook or >> incollection. Cheap publishers regularly put out such collections of >> out-of-copyright works. >> >> The implicit assumption that a work with no documented publisher is a >> self-published work is not especially to my liking -- publishers may >> have good reason to not identify themselves (think of the publishers >> of the works of Spinoza and, in part, Voltaire) -- but I understand >> that the APA thinks it important. Of course, if you cannot document >> the publisher for an entry, you can explicitly list it as unknown or >> /sine nomine/, as appropriate, to avoid the infelicity of having the >> author's name just stuck in there. > > I sent a simple fix to Hans that handles the missing editor, silently. > Someone who would want "Anonymous" or "unknown", or anything else can > always put editor="Anonymous", etc. in their .bib database. Thank you all for the precious comments. The current LMTX appears to have almost fixed my issue, except that inproceedings entries without a publisher have the text "Author" instead of the publisher's name. I must say that I have no requirement to use the APA style specifically; I do it only because it uses the format (Name, Year) for the citation. I guess that I could use another style (aps seems fine) and just customize the citation format. I have tried with \usebtxdataset[main.bib] \setupbtx[default:cite][alternative=authoryear] \usebtxdefinitions[aps] but it seems that the setup command has no effect: the citations still use numbers. Nicola ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On Mon, 24 May 2021 23:10:34 -0400 Rik Kabel wrote: > > On 5/24/2021 22:12, Alan Braslau wrote: > > On Mon, 24 May 2021 17:53:49 -0400 > > Rik Kabel wrote: > > > >> This is intended. Or rather, it is a side-effect of the intended > >> behavior. > >> > >> If you add an editor ("editor={Baz, Bar}") you will get something > >> like: > >> > >> Foo, B. (1983). Title of the paper. In B. Baz (Ed.), > >> /Booktitle/. Author. > >> > >> And if you then add a publisher ("publisher={Paymefirst}") you will > >> get: > >> > >> Foo, B. (1983). Title of the paper. In B. Bar (Ed.), > >> Booktitle. Paymefirst. > >> > >> The APA presumes that you have both an editor and a publisher for > >> pieces contained in other works. It calls for the use of the author > >> as publisher if no publisher is present. It is silent about what to > >> do if you have no editor. > > It looks like a missing editor field should be caught. What should > > the rule be? > > > > Actually, @inproceedings should not be used without an editor - > > makes no sense. If the author of the paper happens to be the > > editor, then the .bib data file should define this with an editor= > > field. > > > > We can change the behavior if a clear case can be made as to what > > fallback would make sense. Keep in mind the dictum: "garbage > > in/garbage out"... > > > > Alan > > For the case of works within works (inproceedings, inbook, > incollection, perhaps conference) I would think that the simplest > solution is to simply drop it, so that in the example above one would > simply get: > > Foo, B. (1983). Title of the paper. In /Booktitle/. Paymefirst. > > Although I do think that, at least for inproceedings, lack of an > editor should at least be flagged. A simple compilation of works may > have no named editor, of I see no reason to require it for inbook or > incollection. Cheap publishers regularly put out such collections of > out-of-copyright works. > > The implicit assumption that a work with no documented publisher is a > self-published work is not especially to my liking -- publishers may > have good reason to not identify themselves (think of the publishers > of the works of Spinoza and, in part, Voltaire) -- but I understand > that the APA thinks it important. Of course, if you cannot document > the publisher for an entry, you can explicitly list it as unknown or > /sine nomine/, as appropriate, to avoid the infelicity of having the > author's name just stuck in there. I sent a simple fix to Hans that handles the missing editor, silently. Someone who would want "Anonymous" or "unknown", or anything else can always put editor="Anonymous", etc. in their .bib database. Alan ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On 5/24/2021 22:12, Alan Braslau wrote: On Mon, 24 May 2021 17:53:49 -0400 Rik Kabel wrote: This is intended. Or rather, it is a side-effect of the intended behavior. If you add an editor ("editor={Baz, Bar}") you will get something like: Foo, B. (1983). Title of the paper. In B. Baz (Ed.), /Booktitle/. Author. And if you then add a publisher ("publisher={Paymefirst}") you will get: Foo, B. (1983). Title of the paper. In B. Bar (Ed.), Booktitle. Paymefirst. The APA presumes that you have both an editor and a publisher for pieces contained in other works. It calls for the use of the author as publisher if no publisher is present. It is silent about what to do if you have no editor. It looks like a missing editor field should be caught. What should the rule be? Actually, @inproceedings should not be used without an editor - makes no sense. If the author of the paper happens to be the editor, then the .bib data file should define this with an editor= field. We can change the behavior if a clear case can be made as to what fallback would make sense. Keep in mind the dictum: "garbage in/garbage out"... Alan For the case of works within works (inproceedings, inbook, incollection, perhaps conference) I would think that the simplest solution is to simply drop it, so that in the example above one would simply get: Foo, B. (1983). Title of the paper. In /Booktitle/. Paymefirst. Although I do think that, at least for inproceedings, lack of an editor should at least be flagged. A simple compilation of works may have no named editor, of I see no reason to require it for inbook or incollection. Cheap publishers regularly put out such collections of out-of-copyright works. The implicit assumption that a work with no documented publisher is a self-published work is not especially to my liking -- publishers may have good reason to not identify themselves (think of the publishers of the works of Spinoza and, in part, Voltaire) -- but I understand that the APA thinks it important. Of course, if you cannot document the publisher for an entry, you can explicitly list it as unknown or /sine nomine/, as appropriate, to avoid the infelicity of having the author's name just stuck in there. -- 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] BibTeX inproceedings entries not rendered correctly in APA style
On Mon, 24 May 2021 17:53:49 -0400 Rik Kabel wrote: > This is intended. Or rather, it is a side-effect of the intended > behavior. > > If you add an editor ("editor={Baz, Bar}") you will get something > like: > > Foo, B. (1983). Title of the paper. In B. Baz (Ed.), /Booktitle/. > Author. > > And if you then add a publisher ("publisher={Paymefirst}") you will > get: > > Foo, B. (1983). Title of the paper. In B. Bar (Ed.), Booktitle. > Paymefirst. > > The APA presumes that you have both an editor and a publisher for > pieces contained in other works. It calls for the use of the author > as publisher if no publisher is present. It is silent about what to > do if you have no editor. It looks like a missing editor field should be caught. What should the rule be? Actually, @inproceedings should not be used without an editor - makes no sense. If the author of the paper happens to be the editor, then the .bib data file should define this with an editor= field. We can change the behavior if a clear case can be made as to what fallback would make sense. Keep in mind the dictum: "garbage in/garbage out"... Alan ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
On 5/24/2021 16:28, Nicola wrote: I don't know if this is restricted to inproceedings entries, but consider the following test.bib: @inproceedings{Foo:1983, author = {Foo, Bar}, booktitle = {Booktitle}, pages = {34--39}, title = {Title of the paper}, year = {1983} } When this is typeset: \usebtxdataset[test.bib] \usebtxdefinitions[apa] \starttext \cite[Foo:1983] \placelistofpublications \stoptext the result is: (Foo, 1983) Foo, B. (1983). Title of the paper. In Title of the paper., Booktitle. Author. I would expect: (Foo, 1983) Foo, B. (1983). Title of the paper. In Booktitle, p. 34–39. or something similar. I can reproduce it with ConTeXt from TeX Live 2021 and the current LMTX. Is it a bug? Nicola This is intended. Or rather, it is a side-effect of the intended behavior. If you add an editor ("editor={Baz, Bar}") you will get something like: Foo, B. (1983). Title of the paper. In B. Baz (Ed.), /Booktitle/. Author. And if you then add a publisher ("publisher={Paymefirst}") you will get: Foo, B. (1983). Title of the paper. In B. Bar (Ed.), Booktitle. Paymefirst. The APA presumes that you have both an editor and a publisher for pieces contained in other works. It calls for the use of the author as publisher if no publisher is present. It is silent about what to do if you have no editor. The editor and publisher fields are described as required in mkiv-publications.pdf (page 85), however, you should be able to define your own customized btx handling (see chapter 6) to override this, removing both the editor and the publisher as requirements. Just a little coding. (I have previously suggested that repeating the title in the case of a missing editor should not be done. The behavior has not been changed in last the two years.) You should take careful note of the following from page 29 of that manual: /A note on the APA style: /We get the strong impression that the APA bibliography style standard was made with the implicit assumption that manual intervention would be involved in the editing and production process; It has been an arduous task to create a system capable of fully conforming to these specifications. I will add that there is still quite a bit of work to do for APA and pretty much any other published style. Manual tuning (or editorial leniency) is required to conform in all but the most basic cases. ___ 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] BibTeX inproceedings entries not rendered correctly in APA style
I don't know if this is restricted to inproceedings entries, but consider the following test.bib: @inproceedings{Foo:1983, author = {Foo, Bar}, booktitle = {Booktitle}, pages = {34--39}, title = {Title of the paper}, year = {1983} } When this is typeset: \usebtxdataset[test.bib] \usebtxdefinitions[apa] \starttext \cite[Foo:1983] \placelistofpublications \stoptext the result is: (Foo, 1983) Foo, B. (1983). Title of the paper. In Title of the paper., Booktitle. Author. I would expect: (Foo, 1983) Foo, B. (1983). Title of the paper. In Booktitle, p. 34–39. or something similar. I can reproduce it with ConTeXt from TeX Live 2021 and the current LMTX. Is it a bug? Nicola ___ 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] Special layouts don't recognise placeinitial
Thank you, Hans. This tweak works perfectly on a provisional basis. However, from my relative ignorance of ConTeXt and LMTX, I have a question: Why is it better at the moment to include this code in cont-new.mkxl instead on the preamble of my document? I insist, I do not question this detail. I speak from the lack of knowledge of a user who wants to learn a little more. Eduardo Bohoyo El 23/5/21 a las 13:07, Hans Hagen escribió: On 5/23/2021 2:41 AM, Eduardo Bohoyo wrote: My question will be very simple: Is there a trick to make \placeinitial command work within makeup pages? One of my pages inside the /frontmater/ is a quote page within an special layout. Before using LMTX, when I could use the Lettrine module, that quote started with a capital letter. But now that I use \placeinitial, the first letter no longer changes: it remains a simple initial capital letter. On the other hand, when I use \placeinitial for each first paragraph in the chapters of my book, the result is as expected. That is, the command works fine as long as it stays within the general layout. This is the code I'm referring to: \startmakeup[standard][doublesided=yes] \setuplayout[backspace=176pt,width=194pt] \setupinterlinespace[line=22pt] \style[tfa] \startalignment[hanging,flushleft,nothyphenated] \placeinitial Ahora, vosotros que amáis, dejadme que os formule una pregunta: ¿quién sufre más por ello, Arcite o Palamón? ¿El que ve a su dama diariamente, pero está encerrado para siempre, o el que es libre de ir donde le plazca, pero no verá nunca más a su dama? Aquellos de vosotros que podáis, elegid entre las dos situaciones a voluntad; yo, por mi parte, continuaré como he empezado. \stopalignment \startalignment[hanging,flushright,nothyphenated] \blank[0.8cm,force]{\tfa\sc Geofrey Chaucer,\hspace[big]} \blank[0.1cm,force]{\tfa\em The Canterbury Tales \hspace[big]} \stopalignment \stopmakeup You can add this to cont-new.mkxl (assuming lmtx) \unprotect \permanent\tolerant\protected\def\flushinitial {\typo_initial_handle} \protect and then \placeinitial \flushinitial Ahora, ... will work. More clever automated solutions are likely to interfere and have side effects for embedded cases so this is the best I can come up with now. Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Luatex format error
> On 23 May 2021, at 23:41, Hans Hagen wrote: > > On 5/23/2021 9:28 PM, Hans Åberg wrote: >> Using TexLive 2021, I got the error below. How to fix it? What input file >> should one give? >> % context math_style.tex >> resolvers | formats | executing runner 'run luatex format': >> /usr/local/texlive/2021/bin/universal-darwin/luatex --jobname="math_style" >> --fmt=/Users//Library/texlive/2021/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.fmt >> >> --lua=/Users//Library/texlive/2021/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui >> --c:currentrun=1 --c:fulljobname="./math_style.tex" >> --c:input="./math_style.tex" --c:kindofrun=1 --c:maxnofruns=9 >> --c:texmfbinpath="/usr/local/texlive/2021/bin/universal-darwin" >> This is LuaTeX, Version 1.13.2 (TeX Live 2021) >> system commands enabled. >> ** >> Please type the name of your input file. >> ** > So this is not lmtx (which also has luatex) but the regular installation > right? % context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /usr/local/texlive/2021/texmf-dist/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.03.05 19:11 mtx-context | main context file: /usr/local/texlive/2021/texmf-dist/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.03.05 19:11 % which context /usr/local/texlive/2021/bin/universal-darwin/context > Does that file have \starttext ... \stoptext ? Yes, the example from another thread on math style. \starttext \m{f = \beta} \stoptext > > There is something missing: > > ..cont-en.lui cont-yes.mkiv --c:currentrun=1 > > in mkiv the input is loaded indirectly (via cont-yes.mkiv) but in lmtx we > don't pass that one (not needed as we start up a bit different) Should one use anything else than just 'context'? ___ 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] One chapter with different heading settings
On 5/23/2021 07:43, Jeroen wrote: In the preamble I have the following setup for the chapter header setup. There is one chapter I want to have a different heading setup with some less spacing, what would be the easiest way to achieve this? \setuphead [section] [style=bold, before={\vskip4mm}, after={\vskip1.5mm}] What I do for a chapter that has different requirements is to define a new heading based on my normal chapter. Be sure to include it in the contents list as well if you show a table of contents, and similarly include it in the pdf bookmarks. There may be other, perhaps better ways to do it, but this works well. %% RVchapter can start on recto or verso, chapter on recto only \definehead [RVchapter][chapter] \setuphead [RVchapter][ page=yes, before= ] \setuphead [chapter] [ style=\tfc\HeadFont, page={yes,right}, ..., ] \setuphead [section] [ style=\tfb\HeadFont, ..., ] \setupcombinedlist [content] [list={chapter,RVchapter}] \placebookmarks [chapter,RVchapter,section,subsection,subsubsection] [chapter] [force=yes,number=no] -- 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] One chapter with different heading settings
In the preamble I have the following setup for the chapter header setup. There is one chapter I want to have a different heading setup with some less spacing, what would be the easiest way to achieve this? \setuphead [section] [style=bold, before={\vskip 4mm}, after={\vskip 1.5mm}] ___ 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] Special layouts don't recognise placeinitial
On 5/23/2021 2:41 AM, Eduardo Bohoyo wrote: My question will be very simple: Is there a trick to make \placeinitial command work within makeup pages? One of my pages inside the /frontmater/ is a quote page within an special layout. Before using LMTX, when I could use the Lettrine module, that quote started with a capital letter. But now that I use \placeinitial, the first letter no longer changes: it remains a simple initial capital letter. On the other hand, when I use \placeinitial for each first paragraph in the chapters of my book, the result is as expected. That is, the command works fine as long as it stays within the general layout. This is the code I'm referring to: \startmakeup[standard][doublesided=yes] \setuplayout[backspace=176pt,width=194pt] \setupinterlinespace[line=22pt] \style[tfa] \startalignment[hanging,flushleft,nothyphenated] \placeinitial Ahora, vosotros que amáis, dejadme que os formule una pregunta: ¿quién sufre más por ello, Arcite o Palamón? ¿El que ve a su dama diariamente, pero está encerrado para siempre, o el que es libre de ir donde le plazca, pero no verá nunca más a su dama? Aquellos de vosotros que podáis, elegid entre las dos situaciones a voluntad; yo, por mi parte, continuaré como he empezado. \stopalignment \startalignment[hanging,flushright,nothyphenated] \blank[0.8cm,force]{\tfa\sc Geofrey Chaucer,\hspace[big]} \blank[0.1cm,force]{\tfa\em The Canterbury Tales \hspace[big]} \stopalignment \stopmakeup You can add this to cont-new.mkxl (assuming lmtx) \unprotect \permanent\tolerant\protected\def\flushinitial {\typo_initial_handle} \protect and then \placeinitial \flushinitial Ahora, ... will work. More clever automated solutions are likely to interfere and have side effects for embedded cases so this is the best I can come up with now. Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Special layouts don't recognise placeinitial
My question will be very simple: Is there a trick to make \placeinitial command work within makeup pages? One of my pages inside the /frontmater/ is a quote page within an special layout. Before using LMTX, when I could use the Lettrine module, that quote started with a capital letter. But now that I use \placeinitial, the first letter no longer changes: it remains a simple initial capital letter. On the other hand, when I use \placeinitial for each first paragraph in the chapters of my book, the result is as expected. That is, the command works fine as long as it stays within the general layout. This is the code I'm referring to: \startmakeup[standard][doublesided=yes] \setuplayout[backspace=176pt,width=194pt] \setupinterlinespace[line=22pt] \style[tfa] \startalignment[hanging,flushleft,nothyphenated] \placeinitial Ahora, vosotros que amáis, dejadme que os formule una pregunta: ¿quién sufre más por ello, Arcite o Palamón? ¿El que ve a su dama diariamente, pero está encerrado para siempre, o el que es libre de ir donde le plazca, pero no verá nunca más a su dama? Aquellos de vosotros que podáis, elegid entre las dos situaciones a voluntad; yo, por mi parte, continuaré como he empezado. \stopalignment \startalignment[hanging,flushright,nothyphenated] \blank[0.8cm,force]{\tfa\sc Geofrey Chaucer,\hspace[big]} \blank[0.1cm,force]{\tfa\em The Canterbury Tales \hspace[big]} \stopalignment \stopmakeup Eduardo Bohoyo ___ 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] Hand Style Sketching in Metapost
I have updated LMTX and indeed seems to be working now Thanks Op do 20 mei 2021 om 21:05 schreef Aditya Mahajan : > On Thu, 20 May 2021, Jeroen wrote: > > > I have the following working example with hatching. This works fine, but > > when I uncomment the sketching commands, no figure is rendered. Is the > > mp-sketch macro still working? > > Seems to be working here with LMTX ver. 2021.04.29. See attached. > > > 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://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 ___
[NTG-context] t-vim module: no highlighting for custom filetypes
For some reason, the vim module has stopped highlighting code associated to custom filetypes (it still works for built-in filetypes). For instance, typeset this: \usemodule[vim] \startvimrc[name=foo] set nocompatible set runtimepath+=~/foo/ \stopvimrc \definevimtyping[foo][ style={\switchtobodyfont[16pt,tt]}, directory=code/, syntax=foo, alternative=pscolor, vimrc=foo, ] \starttext \startfoo let while endwhile \stopfoo \stoptext The ~/foo/ directory contains ftdetect/foo.vim: au BufRead,BufNewFile *.foo setfiletype foo and syntax/foo.vim: if exists("b:current_syntax") finish endif syn case match syn iskeyword @,48-57,192-255,_ syn keyword fooKeyword let while endwhile hi def link fooKeyword Keyword let b:current_syntax = "foo" If I change `syntax=foo` to, say, `syntax=vim` in \definevimtyping then the code is highlighted. So, I suspect that I am not configuring the runtimepath correctly. Any idea how to fix this? I am using the latest LMTX to which I have added modules as explained here: https://wiki.contextgarden.net/Modules#ConTeXt_LMTX t-vim VERSION reads 2021.03.01. Nicola ___ 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] Hand Style Sketching in Metapost
On Thu, 20 May 2021, Jeroen wrote: > I have the following working example with hatching. This works fine, but > when I uncomment the sketching commands, no figure is rendered. Is the > mp-sketch macro still working? Seems to be working here with LMTX ver. 2021.04.29. See attached. Aditya hatch.pdf Description: Adobe PDF document hatch.tex Description: TeX document %D \module %D [ file=mp-sketch.mp %Dversion=2021.05.13 %D title=\CONTEXT\ \METAPOST\ graphics, %D subtitle=Sketch drawing, %D author=Aditya Mahajan, %D date=\currentdate, %D copyright={Aditya Mahajan}] %D This metapost module is inspired by a TeX.SE question: %D http://tex.stackexchange.com/q/39296/323 %D %D I thought that it would be fun to implement a similar feature in MetaPost. %D %D To use this package in MetaPost: %D %D \starttyping %Dinput mp-sketch; %D %Dbeginfig(1) %D sketchypaths; % Make draw and fill sketchy %D ... %D naturalizepaths; % Restore the value of draw and fill %D ... %Dendfig %D \stoptyping %D %D The code is heavily inspired by Hans Hagen's Metafun macros. %D %D The macro \type{sketchypaths} is modeled after \type{visualizepaths} from %D \filename{mp-tool}. def sketchypaths = let draw = sketchdraw ; let fill = sketchfill ; enddef ; %D Check if \filename{mp-tool} is loaded if not known context_tool : let normaldraw = draw; let normalfill = fill; def naturalizepaths = let fill = normalfill ; let draw = normaldraw ; enddef ; fi %D The variable \type{sketch_amount} determines the amount of randomness in the %D drawing numeric sketch_amount; sketch_amount := 0.75bp; %D The variable \type{sketch_passes} determines the number of times the path %D is drawn numeric sketch_passes; sketch_passes := 1; %D Based on \type{randomized}. Assumes p is path: numeric sketch_segments; sketch_segments := 20; primarydef p sketchrandomized s = ( if path p : for t = 0 step 1/sketch_segments until 1-1/sketch_segments : ((point (t*arclength(p)) on p) randomshifted s) .. controls ((postcontrol (t*arclength(p)) on p) randomshifted s) and ((precontrol ((t+1/sketch_segments)*arclength(p)) on p) randomshifted s) .. endfor if cycle p : cycle else : ((point arclength(p) on p) randomshifted s) fi else : p fi ) enddef ; %D The macro \type{sketchdraw} draws the randomized path. The %D \type{expr} ... \type{text} trick is copied from the definition of %D \type{drawarrow} def sketchdraw expr p = do_sketchdraw(p) enddef; def do_sketchdraw(expr p) text t = if (path p) : for i = 1 upto max(1,sketch_passes) : normaldraw p sketchrandomized sketch_amount withtransparency ("multiply", 1/max(1,sketch_passes)) t ; endfor; else : normaldraw p t; fi enddef; %D The macro \type{sketchfill} randomizes the path before filling it. def sketchfill expr p = do_sketchfill(p) enddef ; def do_sketchfill(expr p) text t = if (path p) : for i = 1 upto max(1,sketch_passes) : normalfill p randomized sketch_amount withtransparency ("multiply", 1/max(1,sketch_passes)) t ; endfor; else : normalfill p t; fi enddef; endinput; % Modified example from % http://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html beginfig(1) pair A,B,C,O; A=(0,0); B=(3cm,0); C=(1cm,2cm); O - 1/2[B,C] = whatever * (B-C) rotated 90; O - 1/2[A,B] = whatever * (A-B) rotated 90; sketchypaths; sketch_amount := 5bp; draw A--B--C--cycle; draw O withpen pencircle scaled 4bp; sketch_amount := 2bp; draw fullcircle scaled 2abs(O-A) shifted O; endfig ___ 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] Hand Style Sketching in Metapost
I have the following working example with hatching. This works fine, but when I uncomment the sketching commands, no figure is rendered. Is the mp-sketch macro still working? \starttext \startMPcode input hatching; %input mp-sketch; %sketchypaths; %sketch_amount := 2bp; u := 1cm; path circle; circle = fullcircle scaled 4u; hatchfill circle withcolor (45, 5mm, -.5bp); draw circle; \stopMPcode \stoptext ___ 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] TeX capacity exceeded
On 5/17/2021 11:43 PM, Thomas A. Schmitz wrote: Hi all, I have a rather large (almost 120,000 lines) xml file, processing pulls in another large xml file. The project compiles under mkiv; with lmtx, I get tex error > tex error on line 8 in file : TeX capacity exceeded, sorry [reference count=32767] Can you check the latest upload? You should be able to go way higher. If you're worried about your lua macros performance you can always run with: --profile and look at the luatex-profile.log file ... it gives a rough impression. be prepared for a slow run (although the latest greatest lmtx should perform some 2.5 times better when profiling). There's also a new (yet unofficial) feature: \starttext \setupfonts [serif=dejavuserif*default, sans=dejavusans, mono=dejavusansmono] {AAA\char1234 AAA} {\ss BBB\char1234 BBB}\par {AA} {\ss BB}\par \dorecurse{1000}{ \char1234 } \stoptext You can set up a list of 'quick and dirty fallback' fonts (you can set a sequence for each style). This doesn't replace the normal fallback mechanisms but can be handy as catch. Hans - 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 : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] simpleslides gives 'input stack overflow'
Hi, Looks like it is a problem with "StartPage" and "StopPage" in metapost. I get the same error with any MP graphic using those commands. More minimal example (without simpleslides) as per the wiki: https://wiki.contextgarden.net/Cover_Pages colors > 'rgb' color space is supported colors > 'cmyk' color space is supported fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost> initializing number mode 'scaled' input stack overflow mtx-context | fatal error: return code: 256 Commenting out "StartPage" and "StopPage" compiles. mtx-context | current version: 2021.05.09 17:14 This is LuaTeX, Version 1.14.0 Development id: 7438 Adam On Sun, May 9, 2021 at 9:57 PM Adam Reviczky wrote: > Hi, > > With the latest luatex change from > https://github.com/TeX-Live/luatex/commit/1566b63b338abbe38ed839fac9f2022ebbfa7d59 > (and MKIV 2021-05-09 17:14:00) I get an input stack overflow: > > simpleslides> loading style Boxed > system > command '\NormalHeight' is already defined > system > command '\NormalWidth' is already defined > system > command '\PictureFrameHeight' is already defined > system > command '\PictureFrameWidth' is already defined > close source> level 4, order 8, name > '/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-Boxed.tex' > close source> level 3, order 8, name > '/usr/share/texmf/tex/context/third/simpleslides/t-simpleslides.mkiv' > fonts > bodyfont '24.0414pt' is defined (can better be done > global) > metapost> initializing instance 'metafun:1' using format 'metafun' > and method 'default' > metapost> loading 'metafun' as > '/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method > 'default' > metapost> initializing number mode 'scaled' > input stack overflow > mtx-context | fatal error: return code: 256 > > MWE from the documentation: > \usemodule[simpleslides][style=Boxed] > \setupTitle[title={Title of the presentation},author={Name of > authors},date={Date of presentation}] > \starttext > \placeTitle > \SlideTitle{The first slide} > Write whatever you want. > \SlideTitle{The second slide} > Continue writing. > \stoptext > > Does that mean the simpleslides module has some recursion problems? > I have tried a couple of themes but getting the same error. > > Adam > > ___ 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] simpleslides gives 'input stack overflow'
Hi, With the latest luatex change from https://github.com/TeX-Live/luatex/commit/1566b63b338abbe38ed839fac9f2022ebbfa7d59 (and MKIV 2021-05-09 17:14:00) I get an input stack overflow: simpleslides> loading style Boxed system > command '\NormalHeight' is already defined system > command '\NormalWidth' is already defined system > command '\PictureFrameHeight' is already defined system > command '\PictureFrameWidth' is already defined close source> level 4, order 8, name '/usr/share/texmf/tex/context/third/simpleslides/s-simpleslides-Boxed.tex' close source> level 3, order 8, name '/usr/share/texmf/tex/context/third/simpleslides/t-simpleslides.mkiv' fonts > bodyfont '24.0414pt' is defined (can better be done global) metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/usr/share/texmf/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost > initializing number mode 'scaled' input stack overflow mtx-context | fatal error: return code: 256 MWE from the documentation: \usemodule[simpleslides][style=Boxed] \setupTitle[title={Title of the presentation},author={Name of authors},date={Date of presentation}] \starttext \placeTitle \SlideTitle{The first slide} Write whatever you want. \SlideTitle{The second slide} Continue writing. \stoptext Does that mean the simpleslides module has some recursion problems? I have tried a couple of themes but getting the same error. Adam ___ 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] Issue running ConTeXt from TeX Live 2019 on Alpine Linux 3.12
// TEXINPUTS.latex209 = $TEXMFDOTDIR;$TEXMF/tex/{latex209,generic,latex,}// TEXINPUTS.olatex= $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}// % MLTeX. TEXINPUTS.frlatex = $TEXMFDOTDIR;$TEXMF/tex/{french,latex,generic,}// TEXINPUTS.frtex = $TEXMFDOTDIR;$TEXMF/tex/{french,plain,generic,latex,}// TEXINPUTS.mllatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}// TEXINPUTS.mltex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// % e-TeX. TEXINPUTS.elatex= $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}// TEXINPUTS.etex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// % pdfTeX. TEXINPUTS.pdfcslatex= $TEXMFDOTDIR;$TEXMF/tex/{cslatex,csplain,latex,generic,}// TEXINPUTS.pdfcsplain= $TEXMFDOTDIR;$TEXMF/tex/{csplain,plain,generic,latex,}// TEXINPUTS.pdflatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}// TEXINPUTS.pdflatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,latex,generic,}// TEXINPUTS.pdfmex= $TEXMFDOTDIR;$TEXMF/tex/{mex,plain,generic,latex,}// TEXINPUTS.utf8mex = $TEXMFDOTDIR;$TEXMF/tex/{mex,plain,generic,latex,}// TEXINPUTS.pdftex= $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// TEXINPUTS.pdftexinfo= $TEXMFDOTDIR;$TEXMF/tex/{texinfo,plain,generic,latex,}// TEXINPUTS.pdfamstex = $TEXMFDOTDIR;$TEXMF/tex/{amstex,plain,generic,latex,}// % pdfeTeX. TEXINPUTS.pdfelatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}// TEXINPUTS.pdfetex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// % LuaTeX. TEXINPUTS.luatex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}// TEXINPUTS.luajittex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}// TEXINPUTS.luahbtex= $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}// TEXINPUTS.luajithbtex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}// TEXINPUTS.dviluatex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}// TEXINPUTS.lualatex= $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}// TEXINPUTS.lualatex-dev= $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}// TEXINPUTS.luajitlatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}// TEXINPUTS.luahblatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}// TEXINPUTS.luahblatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}// TEXINPUTS.luajithblatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}// TEXINPUTS.dvilualatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}// TEXINPUTS.dvilualatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}// % HarfTeX. TEXINPUTS.harftex = $TEXMFDOTDIR;$TEXMF/tex/{harftex,luatex,plain,generic,latex,}// TEXINPUTS.harflatex = $TEXMFDOTDIR;$TEXMF/tex/{harflatex,harftex,lualatex,latex,luatex,generic,}// TEXINPUTS.harflatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,harflatex,harftex,lualatex,latex,luatex,generic,}// % XeTeX. TEXINPUTS.xelatex = $TEXMFDOTDIR;$TEXMF/tex/{xelatex,latex,xetex,generic,}// TEXINPUTS.xelatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,xelatex,latex,xetex,generic,}// TEXINPUTS.xeplain = $TEXMFDOTDIR;$TEXMF/tex/{xeplain,eplain,plain,xetex,generic,latex,}// TEXINPUTS.xetex = $TEXMFDOTDIR;$TEXMF/tex/{xetex,plain,generic,latex,}// % Omega / Aleph. TEXINPUTS.aleph = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// TEXINPUTS.elambda = $TEXMFDOTDIR;$TEXMF/tex/{lambda,latex,generic,}// TEXINPUTS.eomega= $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// TEXINPUTS.lambda = $TEXMFDOTDIR;$TEXMF/tex/{lambda,latex,generic,}// TEXINPUTS.lamed = $TEXMFDOTDIR;$TEXMF/tex/{lambda,latex,generic,}// TEXINPUTS.omega = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}// % p(La)TeX. TEXINPUTS.ptex = $TEXMFDOTDIR;$TEXMF/tex/{ptex,plain,generic,latex,}// TEXINPUTS.platex= $TEXMFDOTDIR;$TEXMF/tex/{platex,latex,generic,}// TEXINPUTS.platex-dev= $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,platex,latex,generic,}// % epTeX, and use that engine for pmpost. TEXINPUTS.eptex = $TEXMFDOTDIR;$TEXMF/tex/{ptex,plain,generic,latex,}// TEX.pmpost = eptex % p(La)TeX-ng TEXINPUTS.ptex-ng = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}// TEXINPUTS.platex-ng = $TEXMFDOTDIR;$TEXMF/tex/{uplatex,platex,latex,generic,}// % (e)up(La)TeX, and for upmpost TEXINPUTS.uplatex = $TEXMFDOTDIR;$TEXMF/tex/{uplatex,platex,latex,generic,}// TEXINPUTS.uplatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,uplatex,platex,latex,generic,}// TEXINPUTS.uptex = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}// TEXINPUTS.euptex = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}// TEX.upmpost = euptex % pBibTeX bibliographies and style files. BIBINPUTS.pbibtex = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bib// BSTINPUTS.pbibtex = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bst// % upBibTeX bibliographies