Terminal input/output

\typein[cmd]{msg}
Synopsis:

\typein[\cmd]{msg}

\typein prints msg on the terminal and causes LaTeX to stop and wait for you to type a line of input, ending with return. If the optional \cmd argument is omitted, the typed input is processed as if it had been included in the input file in place of the \typein command. If the \cmd argument is present, it must be a command name. This command name is then defined or redefined to be the typed input.

\typeout{msg}
Synopsis:

\typeout{msg}

Prints msg on the terminal and in the log file. Commands in msg that are defined with \newcommand or \renewcommand (among others) are replaced by their definitions before being printed.
LaTeX’s usual rules for treating multiple spaces as a single space and ignoring spaces after a command name apply to msg. A \space command in msg causes a single space to be printed, independent of surrounding spaces. A ^^J in msg prints a newline.