diff --git a/manual/luatex-enhancements.tex b/manual/luatex-enhancements.tex index 775d11999d647ad336dddad3dd5f4b4bba0678d7..d1da33878e0561cda43425b33b7fc52bf49ae010 100644 --- a/manual/luatex-enhancements.tex +++ b/manual/luatex-enhancements.tex @@ -891,6 +891,20 @@ ignores the value. This allows for embedded spaces, without the need for double quotes. Macro expansion takes place inside the argument. +The \type {\tracingfonts} primitive that has been inherited from \PDFTEX\ has +been adapted to support variants in reporting the font. The reason for this +extension is that a csname not always makes sense. The zero case is the default. + +\starttabulate[|T||] +\NC 0 \EQ \type{\foo xyz} \NC \NR +\NC 1 \EQ \type{\foo (bar)} \NC \NR +\NC 2 \EQ \type{<bar> xyz} \NC \NR +\NC 3 \EQ \type{<bar @ ..pt> xyz} \NC \NR +\NC 4 \EQ \type{<id>} \NC \NR +\NC 5 \EQ \type{<id: bar>} \NC \NR +\NC 6 \EQ \type{<id: bar @ ..pt> xyz} \NC \NR +\stoptabulate + \subsection{Writing to file} You can now open upto 127 files with \type {\openout}. When no file is open diff --git a/manual/luatex.pdf b/manual/luatex.pdf index 07746d3939ef5935da2c2389ccc668407e86521e..3e3b012352f546d256bded045ee6ce59e417b982 100644 Binary files a/manual/luatex.pdf and b/manual/luatex.pdf differ diff --git a/source/texk/web2c/luatexdir/tex/printing.w b/source/texk/web2c/luatexdir/tex/printing.w index 006392810b92d52ddc6d2a35f4ef8b7cb7eac9aa..72444156480074c88aefdc6fee7901404608203d 100644 --- a/source/texk/web2c/luatexdir/tex/printing.w +++ b/source/texk/web2c/luatexdir/tex/printing.w @@ -838,25 +838,66 @@ int font_in_short_display; /* an internal font number */ sort of ``complicated'' are indicated only by printing `\.{[]}'. @c + +/* +So, 0, 1 as well as any large value will behave the same as before. The reason +for this extension is that a \name not always makes sense. + +0 \foo xyz +1 \foo (bar) +2 <bar> xyz +3 <bar @@ ..> xyz +4 <id> +5 <id: bar> +6 <id: bar @@ ..> xyz + +*/ + void print_font_identifier(internal_font_number f) { str_number fonttext; fonttext = font_id_text(f); - if (fonttext > 0) { - print_esc(fonttext); + if (tracing_fonts_par >= 2 && tracing_fonts_par <= 6) { + /* < > is less likely to clash with text parenthesis */ + tprint("<"); + if (tracing_fonts_par >= 2 && tracing_fonts_par <= 3) { + print_font_name(f); + if (tracing_fonts_par >= 3 || font_size(f) != font_dsize(f)) { + tprint(" @@ "); + print_scaled(font_size(f)); + tprint("pt"); + } + } else if (tracing_fonts_par >= 4 && tracing_fonts_par <= 6) { + print_int(f); + if (tracing_fonts_par >= 5) { + tprint(": "); + print_font_name(f); + if (tracing_fonts_par >= 6 || font_size(f) != font_dsize(f)) { + tprint(" @@ "); + print_scaled(font_size(f)); + tprint("pt"); + } + } + } + print_char('>'); } else { - tprint_esc("FONT"); - print_int(f); - } - if (tracing_fonts_par > 0) { - tprint(" ("); - print_font_name(f); - if (font_size(f) != font_dsize(f)) { - tprint("@@"); - print_scaled(font_size(f)); - tprint("pt"); + /* old method, inherited from pdftex */ + if (fonttext > 0) { + print_esc(fonttext); + } else { + tprint_esc("FONT"); + print_int(f); + } + if (tracing_fonts_par > 0) { + tprint(" ("); + print_font_name(f); + if (font_size(f) != font_dsize(f)) { + tprint("@@"); + print_scaled(font_size(f)); + tprint("pt"); + } + print_char(')'); } - print_char(')'); } }