General ⇒ special toprule and bottom rule of table
special toprule and bottom rule of table
I need to have a table of the following shape:
Description
toprule
contents
bottomrule
where Description is left-aligned
toprule is a horzontal line with ends having angled-corners opposite to the ones in bottomrule
bottomrule is a horizontal line looks like (|_______________|) but connected (no spaces).
it is something like in the attached file. In fact I am not sure is it "box" or a "table".
thanks for help!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
special toprule and bottom rule of table
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
special toprule and bottom rule of table
localghost wrote: Maybe the arydshln package could be helpful.
thanx for the tip localghost. I was not aware of arydshln (good to know:-)). However, it does not help unless I do some workarounds like introducing table inside another..
Sami
special toprule and bottom rule of table
Code: Select all
\par\noindent{\rule[-5pt]{0.4pt}{5pt}\leaders\hrule\hfill\rule[-5pt]{0.4pt}{5pt}}\newline
The contents
\vspace*{-5pt}\par\noindent\textcolor{inputcol}{\rule{0.4pt}{5pt}\leaders\hrule\hfill\rule{0.4pt}{5pt}} \newline
any help?
special toprule and bottom rule of table
Code: Select all
\documentclass[12pt,letterpaper]{report}
\begin{document}
\newcommand{\mytoprule}[1]{#1\vspace*{-12pt}\par\noindent{\rule[-5pt]{0.4pt}{5pt}\leaders\hrule\hfill\rule[-5pt]{0.4pt}{5pt}}\newline}
\newcommand{\mybottomrule}{\vspace*{-1pt}\par\noindent{\rule{0.4pt}{5pt}\leaders\hrule\hfill\rule{0.4pt}{5pt}}\newline}
\mytoprule{{\flushleft S{\footnotesize YNTAX}E{\footnotesize XTENSION}}}
\begin{tabular}{ll}
$F\ ::=\ /\ |\ *\ |\ f $ & \textit{Field Pattern} \\
\end{tabular}
\mybottomrule
\end{document}
Sami