Discussion:
CWeb: why is there no linebreak after chunk names?
(too old to reply)
Johann 'Myrkraverk' Oskarsson
2018-10-13 14:06:38 UTC
Permalink
Hi all,

Given the very short example below, the resulting code shows up with

<print hello world>return 0;

and no line break between the chunk name, and the following return
statement.

Why is this? Is this a bug in CWeb or some other tool, or am I doing
something wrong?


\documentclass{cweb}

\begin{document}

@ Hello, world.

@<print ...@>=
printf( "Hello, world!\n" );
@

@c
#include <stdio.h>

int main()
{
@<print hello world@>

return 0;
}
@

\end{document}
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Johann 'Myrkraverk' Oskarsson
2018-10-15 11:55:03 UTC
Permalink
Hi all,
Post by Johann 'Myrkraverk' Oskarsson
Given the very short example below, the resulting code shows up with
  <print hello world>return 0;
and no line break between the chunk name, and the following return
statement.
Why is this?  Is this a bug in CWeb or some other tool, or am I doing
something wrong?
My question has been answered [1] and I need to put @/ where I want the
linebreaks. I've fixed the code below.
Post by Johann 'Myrkraverk' Oskarsson
\documentclass{cweb}
\begin{document}
@ Hello, world.
@<print ...@>=
printf( "Hello, world!\n" );
@
@c
#include <stdio.h>
int main()
{
  return 0;
}
@
\end{document}
[1]
https://tex.stackexchange.com/questions/455022/cweb-why-are-my-chunk-names-not-inserted-with-a-newline/455190#455190
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Loading...