1

How To Insert Horizontal Line In Scientific Work Place ? like This

enter image description here

  • Welcome to TeX.SE. Please clarify what you mean by "Up and Down Horizontal Line". – Mico Mar 18 '17 at 6:35
3

There are several possibilities to achieve that:

  1. using a tabular(table) and a newcolumntype from

    Here: https://tex.stackexchange.com/a/12712/127845

    Which allows a column like the p{<width>} column but centered C{<width>}. So using a table and tabular one can get as MWE

     \documentclass{scrartcl}
     \usepackage{array,booktabs}
    
     \newcoumntype{C}][1]{%
      >{ \centering\ket\newline\\\arraybackslash\hspace{0pt}}m{#1}}
    
     \begin{document}
    
     \thispagestyle{empty}
    
     \vspace*{0pt}
     \begin{table}
       \centering
       \begin{tabular}{C{1\textwidth}
         \toprule[3ex]
         {\LARGE Musterklausur Nr.1 } \\[2ex]
         {\large L\"osungsvorschlag   } \\[3ex]
         \bottomrule
       \end{tabular}
     \end{table}
    
     \vfill
    
     \end{document}
    
  2. using the tcolorboxpackage one could adjust the frame and spacing

    \usepackage{tcolorbox}
    
    \begin{document}
    
    \begin{tcolorbox}[%
      boxrule=0pt,        % width of all parts of the frame
      toprule=2pt,        % width of top part frame   
      bottomrule=2pt,     % width of bottom part frame
      top=3ex,            % vspace between content and frame top
      bottom=3ex          % vspace between content and frame bottom
      after=\vspace{3ex}, % set space after box
      arc=0pt,            % more or less rounded corners (now sharp)
      oversize            % make it a bit more then textwidth
      ]
      \centering
      {\LARGE Musterklausur Nr.1 } \\[2ex]
      {\large L\"osungsvorschlag   }
    \end{tcolorbox}
    
    \end{document}
    

The color of the box and frame can be changed with the keys colback and colframe. There are a lot of possibilities explained in the tcolorbox documentation:

http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tcolorbox/tcolorbox.pdf)

  • Don't you think you crack a nut with a sledgehammer using tcolorbox? – TeXnician Mar 18 '17 at 17:02
  • Well, I do admit its a bit of an overkill perhaps. On the otherhand it does the job in a not workaroundish fashion, if you know what I mean. – franziska Mar 18 '17 at 20:16
  • 1
    Using a table seems to be wrong here. – Johannes_B Mar 19 '17 at 10:46
  • Another thing, it should be {\Large Wombat} or even {\Large Wombat\par}. Those are switches that don't take an argument. Unfortunately done wrong by many and so it carries on an on. – Johannes_B Mar 19 '17 at 11:02
  • @Johannes_B: Good point, changed that according to your comment. – franziska Mar 19 '17 at 11:11
1

For those rules around the title (I assume you mean them) you can use \rule{<width>}{<height}. For example \rule{\linewidth}{1pt}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.