Note the presence of double-spaced blank lines in the following document
and in the attached source file:

\setuptyping[numbering=line]
\starttext

\startbuffer[javacode]
try {
  final var num = stack.pop();

  if( num != null ) {
    stack.push( blah );
  }


  return true;
}
\stopbuffer

\type{\typebuffer}:
\typebuffer[javacode]

\type{\typing}:
\starttyping
try {
  final var num = stack.pop();

  if( num != null ) {
    stack.push( blah );
  }


  return true;
}
\stoptyping

\type{\typefile}:
\typefile{t.java}

\stoptext

There appear to be two issues.

First, \typefile produces what I'd consider the "correct" result, where the
double-spaced lines appear on the page as a double-space. Both the
\typebuffer and \typing commands ignore double-spacing. The double-spacing
is also ignored by \xmldisplayverbatim. How would you configure to give
\typebuffer, \typing, and \xmldisplayverbatim to honour double-spaces the
same way as \typefile?

Second, of lesser importance, is that the blank lines aren't numbered. This
makes the line numbers inconsistent with respect to IDEs. How would you
label all blank lines as well?

Out of curiosity, does the second issue relate to the first?

Thank you!
try {
  final var num = stack.pop();
  
  if( num != null ) {
    stack.push( blah );
  }
  
  
  return true;
}
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to