LaTeX forum ⇒ Graphics, Figures & TablesNewline before verbatim envir Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
erwann
Posts: 72
Joined: Thu Aug 25, 2016 2:24 am

Newline before verbatim envir

Postby erwann » Mon May 14, 2018 12:50 am

How can I suppress the line between 'Input' and the verbatim environment that shows in the output?

  1. \documentclass{l3doc}
  2. \usepackage{expl3}
  3. \usepackage{xparse}
  4. \usepackage{float}
  5. \usepackage{ccaption}
  6. \usepackage{cleveref}
  7.  
  8. \begin{document}
  9.  
  10. \floatstyle{ruled}
  11. \newfloat{Program}{h}{lop}%[section]
  12. \begin{Program}
  13. \textbf{Input}
  14. \begin{verbatim}
  15. \NewDocumentCommand{\foo}{m}{Hello~#1!}
  16. \foo{World}
  17. \end{verbatim}
  18. \textbf{Output}\\
  19. \NewDocumentCommand{\foo}{m}{Hello~#1!}
  20. \foo{World}
  21. \caption{Hello~World!}\label{code:helloworld}
  22. \end{Program}
  23.  
  24. \end{document}
Screenshot from 2018-05-13 18-49-01.png
Screenshot from 2018-05-13 18-49-01.png (10.59 KiB) Viewed 307 times
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9106
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon May 14, 2018 11:05 am

Maybe a quick fix:

  1. \vspace{-\topsep}
  2. \begin{verbatim}
  3. ...


Stefa
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 8 guests