From LATEX-L@DHDURZ1.Berkeley.EDU Wed Jun 24 03:22:33 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA16631; Wed, 24 Jun 92 03:22:32 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Wed, 24 Jun 1992 03:22 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 8491; Wed, 24 Jun 92 02:21:32 PDT Date: Wed, 24 Jun 92 11:03:57 +0200 From: Rainer Schoepf Subject: NFSS version 2 proposal Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: X-Envelope-To: beebe@MATH.UTAH.EDU The last time the discussion about NFSS version 2 was started, it quickly trailed off in other directions. I'd like to start it again, by sending around a slightly changed version of the notes written down by Chris Rowley and myself, followed by some excerpts from the discussion in January. I'd appreciate comments. Rainer Sch"opf ------------- % Changes by Chris are marked (approxly) by %%CCC % Comments and questions, even answers! are in marginals. % We probably need to be more precise about the syntax and about % the implementation, particularly of the "preprocessing" of the % table, and the storing of computed values before sending it out % more generally for comments. \documentstyle[11pt]{article} % draft defs: \newcommand{\ccc}[1]{\marginpar{\raggedright{\bf CAR:} #1}} \newcommand{\RmS}[1]{\marginpar{\raggedright{\bf RmS:} #1}} \author{Chris Rowley \and Rainer Sch\"opf} \date{Paris, Jardin du Luxembourg, Stardate 1991/09/26 11:00:00:00.00, updated June 1992 by RmS} \title{How to treat math fonts --- how to specify them} \begin{document} \maketitle \section{Notation} Just to distinguish these dreaded kinds of text size\ldots \begin{description} %%CCC \item [text-size] The size used in the text surrounding a math formula, i.e., outside of math mode. %%CCC \item [mathsize] Inside a math formula, the size\ccc{Phil T suggested `mathsize' for this.} used for \verb|\textstyle|. \item [scriptsize] Inside a math formula, the size used for \verb|\scriptstyle|. \item [scriptscriptsize] Inside a math formula, the size used for \verb|\scriptscriptstyle|. \end{description} \section{Informal specification} %%CCC The mathsize, scriptsize and scriptscriptsize to be used with a given text-size can be specified by giving a sequence of \begin{quote} ``math font size specifications'' (MFS). \end{quote} %%CCC An MFS consists of a range, plus $3$ ``functions'' which, in general, take the actual text-size as argument and should be defined to return these $3$ %%CCC values in $3$ specified places (see below). General functions will be supported, but easy specification of certain commonly used {\em linear functions\/} will be supported, in particular \begin{enumerate} %%CCC \item the linear function defined by giving its values at the end points of the range, %%CCC \item the linear function defined by giving its slope and its value at a given point\ccc{Any given point, or just, say, the beginning of the range?}, \item the identity function, %%CCC \item constant functions, \item dilation functions.\RmS{meaning multiplication by a factor} \end{enumerate} The idea behind this is the following: the table entries are searched %%CCC until the first entry is found for which the requested ``text-size'' falls within the specified range. Then the three functions associated with that range are called, with the ``text-size'' as argument. Each of these three functions computes a number and leaves it, say, in a macro \ccc{I would suggest a macro: isnt this just the existing two macros, plus a `mathsize' one?} or dimen register. It is then easy to select the math fonts at the sizes that have just been computed (loading them if necessary). %%CCC [One\ccc{Cant this be done by just using suitable functions/ ranges?} thing that needs further thought is the question of using `nearby' sizes, e.g. 8pt if the computed value is 7.8pt. Even though the surrounding text may be set at 7.8pt it may still be worthwhile to use 8pt math, for example since one doesn't want to recompute the fonts at 7.8pt.] \subsection{nomathsizes?} We are not sure whether the concept of ``nomathsizes'' should remain. %%CCC If it does, what should its effect be? Simply not switch the math fonts, thereby producing surprising results if one uses math---but remember that some constructions (eg itemize labels and footnote markers) involve ``hidden maths''? Or give an error message when math mode is entered---this may also cause surprises due to ``hidden maths''? \RmS{I think that we have to deal with ``hidden maths'' anyway, so we can allow this. I still think that the nomathsizes feature is a useful one.} \subsection{Short forms} %%CCC ``Short forms'' for presently supported cases (i.e.~when the range is a single value) should be provided, e.g.~for saying: 10pt ``text-size'' uses 10/7/5 for math. Perhaps there is a need for short forms for other simple cases as well\ccc{Example: $I/0.7I/0.5I$ where $I$ is the identity.}? \subsection{Fallback} We suggest a ``suitable linear function'' as fall-back when the requested ``text-size'' matches none of the given ranges. This could be done by appending ``invisible'' extra entries at the end of the table (assuming linear search,\ccc{What other search could be used?} for the moment). %%CCC \section{Implementation options} %%CCC One could preprocess the table and look for ``simple entries'', i.e. single value ranges (SVRs). The processed table would be constructed so that these SVRs are tried first, before the ranges. Since this could be done by a simple lookup, similar\ccc{See para below.} to the mechanism in use in the present NFSS, these cases would be comparatively fast. [But this means that these simple entries have different semantics >From ranges, since they are always tried before any range. One might want to get special effects by inserting these simple entries between range entries. But is this sensible?\ccc{I cannot think of any use for this.}] [{\bf CAR:} Would it be much slower if this were not done by just expanding a macro? If the SVRs were still kept in a table, in such a way that their presence could be easily detected and the assignments could be quickly made by that table entry, then this table could be changed by either addition or deletion, as suggested below. A table and look-up like the one used for finding an external font-file name would work, thus the overhead would be like one extra font to check for each size change: or maybe more due to catcode problems?] %%CCC An extension of this idea is to record the result of every calculation in the same way as simple entries: i.e. after 11.25pt has been requested for the first time, there is a simple entry for 11.25pt---thus, if (as is likely) this size is used again, then it can be processed quickly next time. But this needs a switch, to prevent this from happening\ccc{I dont understand this, but see my table suggestion above.}.\RmS{The idea I had was that one might not want to record it, for e xample because this is just one special font in one special size.} %%CCC One needs also to consider the possibility of changing the table during processing, i.e.~forgetting everything that has been calculated so far. We are not sure whether this is needed or whether it is even sensible to allow this. But it might happen that, when another font family is used, different sizes are needed for math. \RmS{I now think that it is needed when switching to other font families, with different weight and width.} \section{An extension} One could have more than three functions in a ``math font size specification''. These extra functions would be used to calculate values based on ranges for ``text-size'', e.g., \verb|\jot|, or for tweaking the fontdimen parameters\ccc{This could be done by allowing optional ``arbitrary functions'' with input the ``text-size'' supplied, possibly as an argument to these functions.}. This certainly needs more thought. \end{document} -------- From LATEX-L@DHDURZ1.Berkeley.EDU Wed Jun 24 03:24:09 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA16641; Wed, 24 Jun 92 03:24:08 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Wed, 24 Jun 1992 03:23 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 8495; Wed, 24 Jun 92 02:22:57 PDT Date: Wed, 24 Jun 92 11:11:25 +0200 From: Rainer Schoepf Subject: Some excerpts from the previous discussion re nfss 2 Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: X-Envelope-To: beebe@MATH.UTAH.EDU Chris showed some examples on how scaled math fonts could be specified: So here are some examples of possible simple cases: these could be implemented fairly easily using the techniques similar to those in Frank's recent stuff for scaled fonts. (Disclaimer: Rainer is not responsible for the following, unless they turn out to be "just what is needed":-}.) There are two examples here, the second is upwardly compatible with the first. 1. For use with scalable text fonts and unscalable math fonts: Three constant functions. 2. For use with scalable text fonts and scalable math fonts: Three linear functions, but only one type of specification (values at end-points of the range). I cannot see how anything less general than this can be useful for scaled fonts. Here are the types of input required to set-up the tables: something of this form would replace the present collection of \define@mathsizes commands. 1. Constants: \mathsizes@table{% <*5-5.5>{5}{5}{5}% <*5.5-6.5>{6}{5}{5}% <*6.5-7.5>{7}{6}{5}% <*7.5-8.5>{8}{6}{5}% <*8.5-9.5>{9}{7}{5}% <*9.5-10.5>{10}{8}{6}% <*10.5-11.5>{11}{9}{7}% <*11.5-12.5>{12}{10}{8}% ) [Semantics (eg): <*7.5-8.5>{8}{6}{5}% means that for text-size in the range 7.5pt to 8.5pt, math-size is 8pt scriptsize is 6pt scriptscriptsize is 5pt ] 2. This one also contains more general linear functions (defined by their end-point values): \mathsizes@table{% <*5-5.5>{5}{5}{5}% <*5.5-6.5>{*I}{5}{5}% <*6.5-7.5>{*I}{*5-5.5}{5}% <*7.5-8.5>{*I}{*5.5-6.5}{5}% <*8.5-9.5>{*I}{*6.5-7.5}{*5-5.5}% <*9.5-10.5>{*I}{*7.5-8.5}{{*5.5-6.5}}% <*10.5-11.5>{*I}{8.5-9.5}{*6.5-7.5}% <*11.5-12.5>{*I}{*9.5-10.5}{*7.5-8.5}% } [Semantics (eg): <*7.5-8.5>{*I}{*5.5-6.5}{5}% means that for text-size in the range 7.5pt to 8.5pt, math-size is equal to text-size (I is short for "identical") scriptsize is calculated by linear interpolation (a straight-line graph) between the value of 5.5pt when text-size is 7.5pt and 6.5pt when the text-size is 8.5pt scriptscriptsize is 5pt ] ----------- The first time a text-size is called in a document, the result of consulting tables such as the above is stored in the same way as all math-sizes are stored at present; so that the next time that same size is called, the math-sizes are immediately available---no need to analyse the set-up table again. For example, in Example 2, if \size{9.2} is used, then "\S@9.2" is defined to be the following token list (without spaces, hoffentlich!): \gdef\mf@size{9.2} \gdef\sf@size{7.2} \gdef\ssf@size{5.35} Note that this means that the math-sizes table in use should not be changed within a document. ------------ To which I replied: Yes, but I pointed out before that the relation between \fontsize, and the corresponding three mathsizes may change when fonts are changed. Example: imagine switching from cm-type fonts to ccr or grotesque-type or whatever. It may then be that the math sizes have to be calculated anew, in other words, what has been stored before has to be deleted. I think it is crucial to allow such a change. I *don't* think it has to be as efficient as the rest of the font change mechanism. Finally, something that was only briefly mentioned in our pensees du jardin: some dimen parameters should change with the size, e.g. the height of \bigggggggggggggg delimiters, or \jot. The idea was to record this in the mathsizes table, e.g. \mathsizes@table{% <*5-5.5>{5}{5}{5}{\jot:*1.5-1.8}% <*5.5-6.5>{*I}{5}{5}{\jot:*1.8-2}% <*6.5-7.5>{*I}{*5-5.5}{5}{\jot:2-2.3}% . da capo at nausea } Open questions: 1. Is this a good idea? 2. If so, which syntax is apropriate? So, I'd appreciate comments on that issue. Rainer Sch"opf From LATEX-L@DHDURZ1.Berkeley.EDU Wed Jun 24 11:16:10 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA19420; Wed, 24 Jun 92 11:16:08 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Wed, 24 Jun 1992 11:15 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 6058; Wed, 24 Jun 92 10:14:13 PDT Date: Wed, 24 Jun 92 17:59:30 BST From: CHAA006@VAX.RHBNC.AC.UK Subject: RE: Some excerpts from the previous discussion re nfss 2 Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: <37D1BA9B9602A221@CC.UTAH.EDU> X-Envelope-To: beebe@MATH.UTAH.EDU >>> 1. Is this a good idea? I think so; I agree that one needs the functionality, and therefore the idea (or a closely related one) seems appropriate. >>> 2. If so, which syntax is apropriate? I cannot decide what options I am being offered here! But if I may comment on the syntax in general: a) The leading * is ugly. I can see that it might speed up parsing (slightly), but just looking for an embedded hyphen can't be much slower, and could lead to a more elegant syntax. b) The multiple braces is horrific (IMHO); as {\scriptscriptsize, \scriptsize, \textsize} form a triplet, why not treat it as such --- something like: {5.5-6.5}{5, 5, 5} {6.5-7.5}{5, 6, 7} {7.5-10}{0.5I, 0.7I, 1.0I} [I've just realised your ordering of the three sizes is the converse of mine: I naturally ordered mine in increasing order; you order yours in decreasing order; given the need for mnemonicity, which is more natural ?] c) For \jot et al, what is the syntax for multiple pseudo-assignments? I would advocate something like: {7.5-10}{0.5I, 0.7I, 1.0I}{\jot: ; \strutheight: ; } ** Phil. From LATEX-L@DHDURZ1.Berkeley.EDU Thu Jun 25 10:23:42 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA27120; Thu, 25 Jun 92 10:23:40 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Thu, 25 Jun 1992 10:01 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 0519; Thu, 25 Jun 92 09:01:12 PDT Date: Thu, 25 Jun 92 15:53:29 BST From: CHAA006@VAX.RHBNC.AC.UK Subject: RE: Some excerpts from the previous discussion re nfss 2 Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: X-Envelope-To: beebe@MATH.UTAH.EDU Two things worried me after sending yesterday's message regarding the specification of sizes of maths fonts: 1) What about boundary conditions, and 2222222222222222222222222222222 From LATEX-L@DHDURZ1.Berkeley.EDU Thu Jun 25 10:56:13 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA27278; Thu, 25 Jun 92 10:56:12 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Thu, 25 Jun 1992 10:56 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 3650; Thu, 25 Jun 92 09:54:51 PDT Date: Thu, 25 Jun 92 17:05:10 BST From: CHAA006@VAX.RHBNC.AC.UK Subject: Specification of maths sizes Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: X-Envelope-To: beebe@MATH.UTAH.EDU Two things worried me after sending yesterday's message regarding the specification of sizes of maths fonts: 1) What about boundary conditions, and 2) Why an implicit `I'? So, I lay in bed, and thought about an alternative, which I would now like to offer for discussion: {5 < s <= 6}{0.5s, 0.7s, 1.0s} with the obvious semantics. ** Phil. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of returned mail From LATEX-L@DHDURZ1.Berkeley.EDU Thu Jun 25 10:58:25 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA27288; Thu, 25 Jun 92 10:58:23 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Thu, 25 Jun 1992 10:37 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 2540; Thu, 25 Jun 92 09:35:52 PDT Date: Thu, 25 Jun 92 17:32:12 GMT From: CA_ROWLEY@VAX.ACS.OPEN.AC.UK Subject: RE: Some excerpts from the previous discussion re nfss 2 Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: X-Envelope-To: beebe@MATH.UTAH.EDU Phil Taylor said: > >>> 2. If so, which syntax is apropriate? > > I cannot decide what options I am being offered here! But if I may > comment on the syntax in general: An infinite number: the syntax was just an example based on the current NFSS stuff. > something like: > > {5.5-6.5}{5, 5, 5} > {6.5-7.5}{5, 6, 7} > {7.5-10}{0.5I, 0.7I, 1.0I} Take care: , can be a decimal-comma in TeX numbers. > [I've just realised your ordering of the three sizes is the converse of mine: > I naturally ordered mine in increasing order; you order yours in decreasing > order; given the need for mnemonicity, which is more natural ?] Thya are both equally forgettable. > c) For \jot et al, what is the syntax for multiple pseudo-assignments? > I would advocate something like: > > > {\jot: ; \strutheight: ; } Looks OK to me. chris From LATEX-L@DHDURZ1.Berkeley.EDU Fri Jun 26 03:52:56 1992 Flags: 000000000001 Return-Path: Received: from cc.utah.edu by math.utah.edu (4.1/SMI-4.1-utah-csc-server) id AA02759; Fri, 26 Jun 92 03:52:53 MDT Received: from cmsa.Berkeley.EDU (MAILER@UCBCMSA) by CC.UTAH.EDU with PMDF#10043; Fri, 26 Jun 1992 03:52 MST Received: by UCBCMSA (Mailer R2.08 R208004) id 4280; Fri, 26 Jun 92 02:52:11 PDT Date: Fri, 26 Jun 92 11:36:40 CET From: J%org Knappen Subject: radical changes needed? Sender: Mailing list for the LaTeX3 project To: "Nelson H.F. Beebe" Reply-To: Mailing list for the LaTeX3 project Message-Id: <8C58BDBD26038863@CC.UTAH.EDU> X-Envelope-To: beebe@MATH.UTAH.EDU What is wrong with \footnote{text text text}? Once after the argument of \footnote is read, the catcodes are fixed. This produces problems in mixed language documents, e. g. \footnote{text \begin{greektext}text\end{greektext} text} if the catcodes differ for the different languages. This is, however, common. Therefore a syntax like \begin{footnote} text text text \end{footnote} is preferable. I know, that this kind of change produces compatibility problems between LaTeX2.09 and LaTeX3, but I don't see any other way out of the dilemma described above. You may think the problem is esoteric, but in scholary work it occurs frequently. Scholars are used to give citations in their original language. Consequently, any text producing command (those with the famous moving arguments) need to be changed. There are so many and so common ones ... \chapter \caption \footnote... Comments? Yours, J"org Knappen.