diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex-dev/base/ltnews33.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex-dev/base/ltnews33.tex | 317 |
1 files changed, 307 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/latex-dev/base/ltnews33.tex b/Master/texmf-dist/doc/latex-dev/base/ltnews33.tex index f3341e7a996..922740a7edf 100644 --- a/Master/texmf-dist/doc/latex-dev/base/ltnews33.tex +++ b/Master/texmf-dist/doc/latex-dev/base/ltnews33.tex @@ -1,7 +1,7 @@ % \iffalse meta-comment % % Copyright 2019-2020 -% The LaTeX3 Project and any individual authors listed elsewhere +% The LaTeX Project and any individual authors listed elsewhere % in this file. % % This file is part of the LaTeX base system. @@ -78,6 +78,7 @@ \let\cls\pkg \providecommand\env[1]{\texttt{#1}} +\providecommand\acro[1]{\textsc{#1}} \vbadness=1400 % accept slightly empty columns @@ -111,8 +112,104 @@ +\section{Extending the hook concept to paragraphs} + +Largely triggered by the need for better control of paragraph text +processing, in particular when producing tagged PDF output (see +\cite{33:blueprint}), we have extended the paragraph processing of +\LaTeX{} so that the kernel gains control both at the start and the +end of each paragraph. This is done in a manner that is (or should +be) transparent to packages and user documents. + +Beside the internal control points for exclusive use of the \LaTeX{} +kernel we also implemented four public hooks that can be used by +packages or user via the hook management declarations to achieve +special effects or implement manipulations that in the past were only +possible through redefinitions of \cs{everypar} or \cs{par} with the +usual issue that such changes would conflict with changes in other +packages. + +The documentation of the hooks together with a few examples is +provided in \file{ltpara-doc.pdf} and for those who want to study the +(quite interesting) code is found in \file{ltpara-code.pdf}. At +some point in the future it will get fully merged into the \LaTeX{} +kernel and will then appear in \file{source2e.pdf}. + + + \section{Other changes to the \LaTeX{} kernel} +\subsection{Adjusting \env{itemize} labels with \cs{labelitemfont}} + +The command \cs{labelitemfont} was in fact already introduced with the +\LaTeX\ release 2020-02-02, but back then we forgot to describe it, so +we do this now. Its purpose is to resolve some bad formatting issues +with the \env{itemize} environment and at the same time make it easier +to adjust its layout if necessary. What could happen in the past was the the +\env{itemize} labels, e.g., the \textbullet{}, would sometimes react to +surrounding font changes and could suddenly change shape, for example +to \textit{\textbullet}. + +Now \cs{labelitemfont} is applied to each +label defaulting to \cs{normalfont} which will prevent this behavior. +By choosing a different settings other effects can be achieved, for example +\begin{verbatim} + \renewcommand\labelitemfont + {\normalfont\fontfamily{lmss}\selectfont} + \renewcommand\labelitemfont + {\rmfamily\normalshape} +\end{verbatim} +The first will take the symbols from Latin Modern Sans so that you get +% +\def\myfont#1{{\let\labelitemfont\empty\fontfamily{lmss}\selectfont#1}} +% +\myfont\labelitemi, \myfont\labelitemii, \myfont\labelitemiii\ and +\myfont\labelitemiv, while the second variant freezes the font family +and shape, but leave the series variable, so that an \env{itemize} in +a bold context would show bolder symbols. Making it empty would give +you the buggy old behavior back. +% +\githubissue{497} + + +\subsection{A note on file names with spaces, dots or UTF-8 characters} + +In one of the the recent \LaTeX{} releases we improved the interface +for specifying file names so that they can now safely contain spaces +(as is common on Windows but also elsewhere), UTF-8 characters +outside the \acro{ascii} range as well as names with several dots in +it. In the past this was only possible by applying a special syntax +(in cases of spaces), not at all for most UTF-8 characters and +not in all circumstances for files with several dots. + +However, \TeX{} has a built-in rule saying that you can leave out the +extension if it is \texttt{.tex}. Because of that \verb=\input{file}= +or \verb=\input{file.tex}= both load \file{file.tex} if it +exists. While this is convenient most of the time it is a little +awkward in some scenarios (for example, when both \file{file} and +\file{file.tex} exist) and also when you manually try to implement +that rule. + +\LaTeX{} therefore had one special syntax for \cs{include} and +\cs{includeonly}: they always expected that their arguments contains a +file name\footnote{In case of \cs{includeonly} a comma separated list + of such names.} without its extension, which had to be +\texttt{.tex}. Thus when you mistakenly wrote +\verb=\include{mychap.tex}= (for example, when you changed from \cs{input} +to \cs{include} somewhere), \LaTeX{} went ahead and looked for the +file \file{mychap.tex.tex} for inclusion and tried to write support +information to the file \file{mychap.tex.aux}. The reason was that +\cs{include} had to construct both physical file names from the +argument and it didn't bother to do something special about the +extension \texttt{.tex}. + +As a side effect of the new implementation this has now changed and +the argument of \cs{include} now gets the extension \texttt{.tex} +removed if it was used. Thus \verb=\include{mychap.tex}= now loads +\file{mychap.tex} and no longer looks for \file{mychap.tex.tex}. +% +\githubissue{486} + \subsection{\cs{end}\texttt{\textbraceleft document\textbraceright} should always start in v-mode} @@ -139,8 +236,32 @@ the name. The coding has now been slightly altered to allow for this. \githubissue{427} +\subsection{Add a Lua callback to \pkg{ltshipout} to provide + a uniform location for applying custom attributes} -\subsection{Provide hook in \cs{selectfont}} +Just before shipping out a page, a new \LuaTeX{} callback +\texttt{pre\_shipout\_filter} is now called to allow final +adjustments to the box to be shipped out. This is particularly for +Lua\TeX\ packages which flag certain elements of the page (e.g. using +attributes or properties) in order to apply certain effects to these +elements at shipout. An example for this is the \pkg{luacolor} +package which could insert the color commands using this callback. + + +\subsection{Improved copy\&paste support for \pdfTeX{} documents} + +When compiling with \pdfTeX{}, additional information is added to the +PDF file to improve copying from and searching in text. This especially +allows ligatures to copy correctly from \pdfTeX{} generated PDF files in +most cases. + +Since this has been integrated into the kernel, most documents should no +longer need to load the \pkg{cmap} package or input \texttt{glyphtounicode}. +% +\githubissue{465} + + +\subsection{Provide a hook in \cs{selectfont}} After \cs{selectfont} has altered the font we run a hook so that packages can make final adjustments. This functionality was originally @@ -173,6 +294,163 @@ the preamble. +\subsection{Shipping out a page while bypassing hooks} + +In the 2020 October release several hooks were added to the page +shipout process, e.g., to add some background or foreground material +to some or all pages. We now also added a \cs{RawShipout} command that +bypasses most of these hooks during the shipout. Some essential +internal bookkeeping still takes place such as updating the +\texttt{totalpages} counter or adding \texttt{shipout/firstpage} or +\texttt{shipout/lastpage} material if the page happens to be the first +or last. + +\subsection{Robust commands in filename arguments} +The filename handling has been modified so that \verb|\string| is +applied while normalizing robust commands while determining the file +name. Previously \verb|\input{\sqrt{2}}| would cause \LaTeX\ to loop indefinitely. +With the new behavior it accesses \verb|sqrt {2}.tex|. +% +\githubissue{481} + + +\subsection{Additional support for Unicode characters from the + Latin Extended Additional block} + +\LaTeX\ is quite capable of typesetting characters such as +\enquote{\d{m}}, but until now it lacked the Unicode mappings for some +characters that are used to write Sanskrit words in Latin +transliteration (as seen in books about yoga, Buddhist philosophy, +etc.). These have now been added so that such characters can be +entered directly instead of resorting to \verb=\d{m}= and so forth. +% +\githubissue{484} + + +\subsection{Always have color groups set up} + +To use color in \LaTeX{} certain constructs, especially boxes, need an +extra layer of groups to ensure that the color setting does not +\emph{escape} and continue outside the box when it shouldn't. To +arrange for this the \LaTeX{} kernel defined a number of commands, e.g., +\cs{color@begingroup} to be used in such places. They have been +initially no-ops and only the color packages redefined them to become +real groups. This arrangement complicates the coding as one has to +account for a group being there (or not there) depending of what is +loaded in the document. So now the kernel already adds the groups. +% +\githubissue{488} + + +\subsection{Execute \cs{par} at the end of \cs{marginpar} arguments} + +In preparation for tagged PDF it is important to properly tag all +paragraphs and this requires running code at the beginning and end of +each. At the end of a paragraph this is done inside the \cs{par} +command, but the way \cs{marginpar} was coded, \LaTeX{} ended the +marginal note without ever explicitly calling \cs{par}. This has now +been changed. +% +\githubissue{489} + + + +\subsection{Producing several footnote marks to one footnote} + +It is sometimes necessary to reference the same footnote several +times, i.e., produce several footnote marks with the same number or +symbol. This is now always possible by placing a \cs{label} into the +\cs{footnote} and reference it with the command \cs{footref} +elsewhere. This way marks refering to footnotes anywhere on the page +(including those in \texttt{minipage}s) can be generated. In the past +this command was only available with certain classes or when loading +the \pkg{footmisc} package. +% +\githubissue{482} + + + +\subsection{Providing the raw option list of packages or documentclass to key/value handlers} + +\LaTeXe{} has always normalized space in option lists so\\ +\verb|\documentclass[ a4paper , 12pt ]{article}|\\ +processed the intended options \texttt{a4paper} and \texttt{12pt}. + +Unfortunately the mechanism used was designed for the simple option +names of the standard option processing. Many classes and packages +now use extended \emph{keyval} processing, however this white space +normalisation makes this difficult: +\verb|[bb=1 2 3 4]| +which might be expected to pass a bounding box of four numbers is +normalised to \texttt{bb=1234} and +\verb|[bb={1 2 3 4}]|\\ +which might be expected to quote the spaces results in low level \TeX{} +parsing errors. + + +For compatibility reasons, the standard option processing has not been +changed however the original un-normalised package and class option lists +are now saved. They are not used in the standard processing, however +extended package option systems may use these \enquote{raw} option list +macros if they are defined. + +The one change affecting the standard processing is that the low level +error mentioned above is now avoided as values (any tokens to the +right of an = sign) are removed from consideration from the \enquote{unused +option list}. In this release \texttt{clip=true} and +\texttt{clip=false} both contribute \texttt{clip} to the list of +options that have been used. +% +\githubissue{85} + + + +\subsection{Poor man's \cs{textasteriskcentered} if missing} + +The \cs{textasteriskcentered} symbol, used as part of the set of +footnote symbols in \LaTeX{}, is assumed to be implemented by +every font in the \texttt{TS1} encoding (when \pdfTeX{} is used) or +in the \texttt{TU} encoding for the Unicode engines. Unfortunately, +that assumption is not correct for all fonts, for example, for the +\texttt{stix2} fonts don't offer the glyph, with the result that one +gets missing glyphs when using \cs{thanks} etc. + +For that reason the definition for \cs{textasteriskcentered} was +altered to check if there is a glyph in the right position and if not +a normal \enquote{*} is used, slightly enlarged and lowered. That may +not be perfect in all cases, but certainly better than nothing show +up. +% +\githubissue{502} + + + +\subsection{Provide more ``dashes'' in encodings \texttt{OT1}, \texttt{T1} and \texttt{TU}} + +When pasting in text from external sources one sometimes encounters the Unicode characters +% +\texttt{"2011} (non-breaking hyphen), +\texttt{"2012} (figure dash) and +\texttt{"2015} (horizontal bar) +% +in addition to the common \texttt{"2013} (en-dash) and \texttt{"2014} +(em-dash). In the past the first three characters produced an error +message when used with \pdfTeX{}. Now they typeset an approximation +(as they are unavailable in \texttt{OT1} or \texttt{T1} encoded fonts +used by \pdfTeX{}), e.g., the figure dash is approximated by an en-dash. + +In Unicode engines they either work (if contained in the selected +Unicode font) or typeset nothing and produce a ``Missing character'' +warning in the log file. + +However, what works in all engines now, is to access the characters +via the command names \cs{textnonbreakinghyphen}, \cs{textfiguredash} +and \cs{texthorizontalbar}, respectively. +% +\githubissue{404} + + + \subsection{\ldots} \emph{to be written} @@ -181,7 +459,6 @@ the preamble. - \section{Changes to packages in the \pkg{graphics} category} \subsection{\ldots} @@ -193,10 +470,23 @@ the preamble. \section{Changes to packages in the \pkg{tools} category} -\subsection{\ldots} +\subsection{\pkg{layout}: Support Japanese as a language option} +The package now recognizes \texttt{japanese} as a language option. +% +\githubissue{353} + + +\subsection{\pkg{longtable}: General bug fix update} +Minor update to \pkg{longtable} to fix bugs reported. Notably the +possibility of incorrect page breaks if floats appear on the same page +that a \env{longtable} starts. As this may affect page breaking in +existing documents, a rollback to \pkg{longtable 4.13} +(\file{longtable-2020-01-07.sty}) is supported. % -\githubissue{xxx} +\gnatsissue{tools}{3512} + + @@ -208,16 +498,23 @@ the preamble. \githubissue{xxx} +\medskip +\begin{thebibliography}{9} + +\fontsize{9.3}{11.3}\selectfont + +\bibitem{33:blueprint} Frank Mittelbach and Chris Rowley: + \emph{\LaTeX{} Tagged PDF — A blueprint for a large project}.\\ + \url{https://latex-project.org/publications/indexbyyear/2020/} +\end{thebibliography} -\end{document} +\end{document} -\medskip -\begin{thebibliography}{9} -\fontsize{9.3}{11.3}\selectfont +\endinput % needed for ltnews processing \bibitem{32:ltnews31} \LaTeX{} Project Team: \emph{\LaTeXe{} news 31}.\\ @@ -236,5 +533,5 @@ the preamble. \emph{Babel---Localization and internationalization}.\\ \url{https://www.ctan.org/pkg/babel} -\end{thebibliography} + |