* Is there a "smart" capitalisation implementation? @ 2022-05-08 4:55 Zhichu via ntg-context 2022-05-08 9:20 ` Hans Hagen via ntg-context 0 siblings, 1 reply; 3+ messages in thread From: Zhichu via ntg-context @ 2022-05-08 4:55 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Zhichu [-- Attachment #1.1: Type: text/plain, Size: 921 bytes --] Hi, I am going to convince the Board of a journal to consider ConTeXt as an additional option. I want to make a module before I say anything. Right now I have this title problem. The journal requires the titles to be CAPITALISED, except for the acronyms. I'm currently using backticks `...` to wrap it and replace it with \egroup ...\WORD\bgroup{} with lpeg. This kinda works, but that's so ugly. Besides, the actual story is that I also want to add markdown as an option, so the backticks actually have meanings. I also checked the typo-cap.lua file to get a clue. But I used to use TeX exclusively and I have to admit that it's so overwhelming for a newbie. I really like the way where bibtex treats words enclosed in curly braces are ignored. Or are there something that's less aggressive than \WORD so the LaTeX trick works: \def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}} Best wishes, ℤhichu ℂhen [-- Attachment #1.2: Type: text/html, Size: 7338 bytes --] [-- Attachment #2: Type: text/plain, Size: 493 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is there a "smart" capitalisation implementation? 2022-05-08 4:55 Is there a "smart" capitalisation implementation? Zhichu via ntg-context @ 2022-05-08 9:20 ` Hans Hagen via ntg-context 2022-05-10 9:20 ` \placenotes ends up in wrong place when mixing one- and two- column layouts Zhichu Chen via ntg-context 0 siblings, 1 reply; 3+ messages in thread From: Hans Hagen via ntg-context @ 2022-05-08 9:20 UTC (permalink / raw) To: Zhichu via ntg-context; +Cc: Hans Hagen On 5/8/2022 6:55 AM, Zhichu via ntg-context wrote: > Hi, > > I am going to convince the Board of a journal to consider ConTeXt as an > additional option. > I want to make a module before I say anything. Right now I have this > title problem. > > The journal requires the titles to be CAPITALISED, except for the > acronyms. I'm currently > using backticks`...`to wrap it and replace it with\egroup > ...\WORD\bgroup{} with > lpeg. This kinda works, but that's so ugly. Besides, the actual story is > that I also want to > add markdown as an option, so the backticks actually have meanings. > > I also checked thetypo-cap.luafile to get a clue. But I used to use TeX > exclusively > and I have to admit that it's so overwhelming for a newbie. > > I really like the way wherebibtextreats words enclosed in curly braces > are ignored. > Or are there something that's less aggressive than\WORDso the LaTeX > trick works: > \def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}} \starttext \protected\def\casing[#1]{\groupedcommand{\setcharactercasing[#1]}{}} \protected\def\nocasing {\groupedcommand{\setcharactercasing[reset]}{}} \setuphead[chapter][textstyle=\WORD] \chapter{some \nocasing{kept} text or \casing[Word]{more} text} \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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* \placenotes ends up in wrong place when mixing one- and two- column layouts. 2022-05-08 9:20 ` Hans Hagen via ntg-context @ 2022-05-10 9:20 ` Zhichu Chen via ntg-context 0 siblings, 0 replies; 3+ messages in thread From: Zhichu Chen via ntg-context @ 2022-05-10 9:20 UTC (permalink / raw) To: Hans Hagen via ntg-context; +Cc: Zhichu Chen Thanks Hans, works perfectly. Sorry for the late reply. Still working on the template and got another one. Again, sorry. The journal is in two-column form and the title, authors, and addresses are spanned to the full width. Very common. But the title may acknowledge to some fund(s) and the authors may have email addresses. If I use \note[thanks] and \note[email] to do that, only the markers are shown. That's expected. So I tried to put \postponenotes before the title and insert\placenotes[thanks] and \placenotes[email] after \startcolumns. The notes did show up but in wrong position. I hope there's another magic switch, or I have to put the marks in the title head and put "real" but invisible notes in the two-column texts. Thanks again, Hans. Yours, Zhichu MWE (not that minimal): =========================================== \definenote[address] \setupnote[address][rule=off,location=text] \definenote[thanks] \setupnote[thanks][location=firstcolumn] \setupnotation[thanks][numberconversion=set 2] \definenote[email][thanks] \definenamespace [addr] [type=module, name=address, command=yes, setup=list, parent=addr, ] \define[1]\useaddress {\edef\currentaddress{#1}% {\setnotetext[address][#1]{\addressparameter{name}}}% \endgraf } \starttext \setupaddress[style=italic] \defineaddress[fst][name={Name of Institute or Affiliation, City, Country}] \defineaddress[snd][name={Name of Secondary Institute or Affiliation, City, Country}] \processcommacommand[fst,snd]\useaddress \postponenotes The Title\thanks{Work supported by somebody.} %\startlocalnotes[address] Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd] %\placelocalnotes[address] %\stoplocalnotes \placenotes[address] \startcolumns \placenotes[thanks] \placenotes[email] \input knuth \stopcolumns \stoptext =========================================== On 5/8/22 17:20, Hans Hagen via ntg-context wrote: > On 5/8/2022 6:55 AM, Zhichu via ntg-context wrote: >> Hi, >> >> I am going to convince the Board of a journal to consider ConTeXt as >> an additional option. >> I want to make a module before I say anything. Right now I have this >> title problem. >> >> The journal requires the titles to be CAPITALISED, except for the >> acronyms. I'm currently >> using backticks`...`to wrap it and replace it with\egroup >> ...\WORD\bgroup{} with >> lpeg. This kinda works, but that's so ugly. Besides, the actual story >> is that I also want to >> add markdown as an option, so the backticks actually have meanings. >> >> I also checked thetypo-cap.luafile to get a clue. But I used to use >> TeX exclusively >> and I have to admit that it's so overwhelming for a newbie. >> >> I really like the way wherebibtextreats words enclosed in curly >> braces are ignored. >> Or are there something that's less aggressive than\WORDso the LaTeX >> trick works: >> \def\NoCaseChange#1{\noexpand\NoCaseChange{\noexpand#1}} > \starttext > > \protected\def\casing[#1]{\groupedcommand{\setcharactercasing[#1]}{}} > \protected\def\nocasing > {\groupedcommand{\setcharactercasing[reset]}{}} > > \setuphead[chapter][textstyle=\WORD] > > \chapter{some \nocasing{kept} text or \casing[Word]{more} text} > > \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 > ___________________________________________________________________________________ > ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-10 9:20 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-05-08 4:55 Is there a "smart" capitalisation implementation? Zhichu via ntg-context 2022-05-08 9:20 ` Hans Hagen via ntg-context 2022-05-10 9:20 ` \placenotes ends up in wrong place when mixing one- and two- column layouts Zhichu Chen via ntg-context
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).