cgnieder / xsim

eXercise Sheets IMproved
65 stars 20 forks source link

Wording of warning message #119

Closed ptoche closed 9 months ago

ptoche commented 9 months ago

Very minor point, I think the following message is the opposite of what's intended? Also weird formatting: presence of (xsim) here and there:

You are compiling your document using XeLaTeX. Please be(xsim) aware that random selection of exercises is unavailable(xsim) in XeLaTeX. If you use this feature you can safely(xsim) ignore this message.

Maybe: If you DO NOT use this feature, no?

muzimuzhi commented 9 months ago

PR #112 opened in Mar, 2023 tried to fix the same wording problem. But as I commented in that PR, XeTeX already provided randomness primitives since TeX Live 2019.

The weird formatting may come from your editor, which (blindly) joined a multi-line warning message. The original formatting in log is

Package xsim Warning: You are compiling your document using XeLaTeX. Please be
(xsim)                aware that random selection of exercises is unavailable
(xsim)                in XeLaTeX. If you use this feature you can safely
(xsim)                ignore this message.
ptoche commented 9 months ago

Oh I'd missed the existence of the PR! Thanks for the feedback.

I copy-pasted from the log file, this is raw text. From how you display the text, it appears that a special editor is needed to view the log file properly, to enforce line breaks in the correct places?

muzimuzhi commented 9 months ago

I copy-pasted from the log file, this is raw text.

That's wired. What warning message do you get from compiling the simplified example below?

\documentclass{article}
\ExplSyntaxOn
% excerpted from https://github.com/cgnieder/xsim/blob/master/code/xsim.random.code.tex
\msg_new:nnn {xsim} {random-numbers-unavailable}
  {
    You~ are~ compiling~ your~ document~ using ~XeLaTeX.~ Please~ be~ aware~
    that~ random~ selection~ of~ exercises~ is~ unavailable~ in~ XeLaTeX.~ If~
    you~ use~ this~ feature~ you~ can~ safely~ ignore~ this~ message.
  }

\msg_warning:nn {xsim} {random-numbers-unavailable}
\ExplSyntaxOff

\begin{document}
\end{document}

In TeXstudio, I can get the joined one-line form in "Issues" panel and the raw multi-line form in "Log File" panel. image

If you get the joined one-line from raw log file, then that's probably a LaTeX3 issue. You can report it to https://github.com/latex3/latex3 and provide your OS info and any settings you think related to end-of-line characters.

ptoche commented 9 months ago

Thanks for the return. I get the same result as you with the simplified example. It was probably something else that messed up the log file. I'll close this now, thanks again.