Date: 19 May 2003 20:09:52 -0700 From: Donald Arseneau Subject: Some items regarding TeX in Hungary Hello, I just read your paper about "Localization of TeX in Hungary" which I greatly enjoyed. For some of the points you raised, I do have some information not mentioned in that article that I should pass on to you. You are probably aware of many of these already, but something might be of help to you. I recall there existed some methof of doubling mathematical operators for Russian typesetting, but I don't know the quality. There is a big problem handling unary vs binary operators. There have been several versions of a "math decimal comma" that work better than the simplest \mathcode `,="013B. My version is: % A comma is a decimal if it is immediately followed by a digit. % Spaces do count for this, unlike the rest of math mode. The % comma is punctuation otherwise. \makeatletter \mathchardef\mathcomma\mathcode`\, \mathcode`\,=32768 % "8000 \begingroup \catcode`\_=12 \catcode`\,=\active \@firstofone{% \endgroup % \edef\DC@char{\meaning_} \def\DC@parse#1 _{\def\DC@parse##1#1 ##2##3\delimiter{##2}} \expandafter\DC@parse\DC@char \toks@={\expandafter\DC@parse\meaning\DC@char} \edef\DC@test{9<2\the\toks@ \DC@char.\delimiter} % \DeclareRobustCommand\ActiveComma{\futurelet\DC@char\DC@docomma} \def\DC@docomma{% \ifnum\DC@test \mathord \fi \mathcomma } \let,\ActiveComma } The sample in your article would be typed \[ F_{i}(x,y) = y^i + 1,3x \qquad x,y \in A,\ i = 1, 2, 3,\ldots \] I have replied to requests for your paragraph indentation rules http://groups.google.com/groups?selm=yfiln1a587i.fsf%40triumf.ca % >Related problem: the last line of a paragraph must be % > either longer than \parindent *and* \shorter than (\hsize-\parindent), % > or it must reach the right margin (exactly \hsize long). \def\par{\ifhmode \unskip \strut \hskip-\parindent \vadjust{}\nobreak \hskip2\parindent \vrule depth 54321sp width 0sp \endgraf \ifdim\prevdepth=54321sp \nobreak \vskip-2\baselineskip \hbox{\strut}% \fi \fi} \parfillskip=\hsize minus\hsize \advance\parfillskip -2\parindent minus-2\parindent %============================================ For hyphenation before explicit hyphens: The Portuguese do that also. I made some hyphenation patterns to implement this for Portuguese. They require two hyphen characters in the font, which are provided by both T1 and LY1 font encodings. If you plan to make a programmatic virtual-font generator for ligatures/long digraphs, you could ensure there is a duplicate hyphen too! Johannes Braams said he would look for a way that babel could manage the \defaulthyphenchar setting transparently, but I have no recent news. Note the comments at the top; and the additions for explicit hyphens begin at "5-4a4". %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The Portuguese TeX hyphenation table: pt8hyph.tex % (C) 2001 by Pedro J. de Rezende (in absentia) % and J.Joao Dias Almeida (jj@di.uminho.pt) % and Donald Arseneau (asnd@triumf.ca) % Version: 1.3 UN-Released date: 2001/02/15 % Donald Arseneau adds patterns to allow breaks before an explicit % hyphen, and prevent breaks right after. % % A LaTeX user can enable proper hyphenation, including hyphenation % before explicit hyphens, with the declaractions: % % \lccode`\-=`\- % \defaulthyphenchar=127 % \usepackage[T1]{fontenc} % % or % % \lccode`\-=`\- % \defaulthyphenchar=173 % \usepackage[LY1]{fontenc} % % (C) 1996 by Pedro J. de Rezende (rezende@dcc.unicamp.br) % and J.Joao Dias Almeida (jj@di.uminho.pt) % Version: 1.2 Release date: 1996/07/21 % % (C) 1994 by Pedro J. de Rezende (rezende@dcc.unicamp.br) % Version: 1.1 Release date: 1994/04/12 % % (C) 1987 by Pedro J. de Rezende % Version: 1.0 Release date: 1987/02/13 % % ----------------------------------------------------------------- % IMPORTANT NOTICE: % % This program can be redistributed and/or modified under the terms % of the LaTeX Project Public License Distributed from CTAN % archives in directory macros/latex/base/lppl.txt; either % version 1 of the License, or any later version. % ----------------------------------------------------------------- % Remember! If you *must* change it, then call the resulting file % something else and attach your name to your *documented* changes. % ====================================================================== % \begingroup \lccode`\^^e0=`\^^e0 % \`a \lccode`\^^e1=`\^^e1 % \'a \lccode`\^^e2=`\^^e2 % \^a \lccode`\^^e3=`\^^e3 % \~a \lccode`\^^e7=`\^^e7 % \c{c} \lccode`\^^e9=`\^^e9 % \'e \lccode`\^^e8=`\^^e8 % \`e \lccode`\^^ea=`\^^ea % \^e \lccode`\^^ed=`\^^ed % \'\i{} \lccode`\^^ee=`\^^ee % \^\i{} \lccode`\^^ef=`\^^ef % \"\i{} \lccode`\^^f3=`\^^f3 % \'o \lccode`\^^f4=`\^^f4 % \^o \lccode`\^^f5=`\^^f5 % \~o \lccode`\^^f6=`\^^f6 % \"o \lccode`\^^fa=`\^^fa % \'u \lccode`\^^fb=`\^^fb % \^u \lccode`\'=`\' \lccode`\-=`\- \message{portuguese hiphenation 8 bits and -} \patterns{ % just type if you're not using INITEX 1b2l 1b2r 1ba 1be 1bi 1bo 1bu 1b^^e1 1b^^e2 1b^^e3 1b^^e9 1b^^ed 1b^^f3 1b^^fa 1b^^ea 1b^^f5 1c2h 1c2l 1c2r 1ca 1ce 1ci 1co 1cu 1c^^e1 1c^^e2 1c^^e3 1c^^e9 1c^^ed 1c^^f3 1c^^fa 1c^^ea 1c^^f5 1^^e7a 1^^e7e 1^^e7i 1^^e7o 1^^e7u 1^^e7^^e1 1^^e7^^e2 1^^e7^^e3 1^^e7^^e9 1^^e7^^ed 1^^e7^^f3 1^^e7^^fa 1^^e7^^ea 1^^e7^^f5 1d2l 1d2r 1da 1de 1di 1do 1du 1d^^e1 1d^^e2 1d^^e3 1d^^e9 1d^^ed 1d^^f3 1d^^fa 1d^^ea 1d^^f5 1f2l 1f2r 1fa 1fe 1fi 1fo 1fu 1f^^e1 1f^^e2 1f^^e3 1f^^e9 1f^^ed 1f^^f3 1f^^fa 1f^^ea 1f^^f5 1g2l 1g2r 1ga 1ge 1gi 1go 1gu 1gu4a 1gu4e 1gu4i 1gu4o 1g^^e1 1g^^e2 1g^^e3 1g^^e9 1g^^ed 1g^^f3 1g^^fa 1g^^ea 1g^^f5 1ja 1je 1ji 1jo 1ju 1j^^e1 1j^^e2 1j^^e3 1j^^e9 1j^^ed 1j^^f3 1j^^fa 1j^^ea 1j^^f5 1k2l 1k2r 1ka 1ke 1ki 1ko 1ku 1k^^e1 1k^^e2 1k^^e3 1k^^e9 1k^^ed 1k^^f3 1k^^fa 1k^^ea 1k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 5-4d4 % 5-4e4 5-4f4 5-4g4 5-4h4 5-4i4 5-4j4 5-4k4 5-4l4 5-4m4 5-4n4 5-4o4 5-4p4 5-4q4 5-4r4 5-4s4 5-4t4 5-4u4 5-4v4 5-4w4 5-4x4 5-4y4 5-4z4 5-4^^e04 5-4^^e14 5-4^^e24 5-4^^e34 5-4^^e74 5-4^^e94 5-4^^e84 5-4^^ea4 5-4^^ed4 5-4^^ee4 5-4^^ef4 5-4^^f34 5-4^^f44 5-4^^f54 5-4^^f64 5-4^^fa4 5-4^^fb4 } \hyphenation{% Do NOT make any alterations to this list! --- PdR hard-ware soft-ware} \endgroup Donald Arseneau asnd@triumf.ca ---------------------------------------------------------------------- %%% a mail of Donald Areseneau %%% mentioned in his previous mail: http://groups.google.com/groups?selm=yfiln1a587i.fsf%40triumf.ca From: Donald Arseneau (asnd@triumf.ca) Subject: Re: Conditionally justify last line of paragraph Newsgroups: comp.text.tex Date: 2000/05/16 John Foster writes: > insisted that whenever a paragraph had its last line nearly full, that > line should be fully justified. For what it is worth, I have this in my toybox. % >Related problem: the last line of a paragraph must be % > either longer than \parindent *and* \shorter than (\hsize-\parindent), % > or it must reach the right margin (exactly \hsize long). \def\par{\ifhmode \unskip \strut \hskip-\parindent \vadjust{}\nobreak \hskip2\parindent \vrule depth 54321sp width 0sp \endgraf \ifdim\prevdepth=54321sp \nobreak \vskip-2\baselineskip \hbox{\strut}% \fi \fi} \parfillskip=\hsize minus\hsize \advance\parfillskip -2\parindent minus-2\parindent This is not made to interact with LaTeX's redefinitions of \par. Although LaTeX has a mechanism for "managing"\par using \@setpar and \@restorepar, it does not share well. By the way, I think the rule about "not shorter than \parindent" is more important than the "not longer than \hsize-\parindent". Donald Arseneau asnd@triumf.ca ---------------------------------------------------------------------------