# Lualatex print \\par stopped producing the result

The \par option stopped working in lualatex in 2019.

tex.print(-2,x .. "\\par") produces only \par in the final text, no paragraph break.

File.txt may be any text file with ^ and & to mark the beginning and end of the selected text.

It used to work in MacTex2018

\documentclass[a4paper,12pt]{article}
\usepackage[lutf8x]{luainputenc}

\begin{luacode*}

file = io.open("File.txt", "r")
file:close()
for x in string.gmatch(text, "^(.-)&") do
tex.print(-2,x .. "\\par")
end
end

\end{luacode*}

\begin{document}

• What do you think the -2 in tex.print does? – Henri Menke Aug 19 '19 at 21:47
• You will want to use tex.sprint(-2,x) tex.sprint("\\par"). – Henri Menke Aug 19 '19 at 21:49
• Many thanks, it is all working again. 1. Having no \usepackage{luacode,luatextra,luaotfload} did not work on Mactex_2019 with Lualatex, still had to include it. The rest worked out. I have found no information on the -2 option in the manuals. Any help? – Dmitry Starostin Aug 19 '19 at 22:28
• @DmitryStarostin Quote: “The optional parameter can be used to print the strings using the catcode regime defined by \catcodetable n. If n is -1, the currently active catcode regime is used. If n is -2, the resulting catcodes are the result of \the\toks: all category codes are 12 (other) except for the space character, that has category code 10 (space).” Your \par output by tex.print(-2, ... "\\par") was made of four character tokens of category 12 (other). This is not the \par control sequence token. – frougon Aug 19 '19 at 22:48