Quantcast
Viewing all articles
Browse latest Browse all 6

Answer by Zarko for Tabularx: Column smaller than text

A small variation of @Mico answer. Used are:

  • cellspace for adding a small vertial space around cells contents
  • djustbox for vertical centering of \chemfig formula

Image may be NSFW.
Clik here to view.
enter image description here

\documentclass[a4paper, 12pt]{scrartcl}\usepackage[T1]{fontenc} % to list words with Umlauts in arg. of '\hyphenation'\usepackage[ngerman]{babel}\usepackage{ragged2e}\usepackage{cellspace, tabularx}\setlength\cellspacetoplimit{4pt}\setlength\cellspacebottomlimit{4pt}\newcolumntype{L}{>{\hspace{0pt}\RaggedRight}X}\usepackage{chemfig}\usepackage{adjustbox}% Create a list of hyphenation exceptions:\hyphenation{plastik-tüten poly-venyl-chlorid poly-etha-fluor-ethen   flaschen-deckel einsatz-beispiel venyl-boden venyl-böden schall-platten}\begin{document}{\renewcommand\tabularxcolumn[1]{m{#1}}\begin{tabularx}{\textwidth}{|L|c|Sc|L|}Name & Monomer & Polymermolekül & Einsatzbeispiel\\    \hlinePolyethen (PE)&   \adjustbox{valign=c}{\chemfig{        H        -[1]C            (-[3]H)        =C            ( -[1]H)        -[7]H}  } &   \schemestart                \chemleft[                    \chemfig{                        -C                            ( -[2]H)                            ( -[-2]H)                        -C                            ( -[2]H)                            ( -[-2]H)                    }                \chemright]$_n$            \schemestop&   Plastiktüten        \\Polypropen (PP)&   \adjustbox{valign=c}{\chemfig{         H         -C            ( -[2]H)            ( -[6]H)        -C            ( -[2]H)        =C            ( -[1]H)            ( -[7]H)}   }&   \schemestart              \chemleft[                \chemfig{                    -[0]C                        ( -[2]H)                        ( -[-2]H)                    -C                        ( -[2]{CH3})                    -[0]                }              \chemright]$_n$            \schemestop&   Flaschendeckel, Brotdosen   \\Polyvenylchlorid (Pvc)&   \adjustbox{valign=c}{\chemfig{        H        -[1]C            ( -[3]H)        =C            ( -[1]Cl)        -[7]H}  }&        \schemestart            \chemleft[                \chemfig{                    -[0]C                        ( -[2]H)                        ( -[-2]H)                    -C                        ( -[6]H)                        ( -[2]{Cl})                    -[0]                }            \chemright]$_n$        \schemestop& Rohrleitungen, Venylböden, Schallplatten    \\Polyethafluorethen (PTFE)&   \adjustbox{valign=c}{\chemfig{        F        -[1]C            ( -[3]F)        =C            ( -[1]F)        -[7]F}  }&   \schemestart              \chemleft[                \chemfig{                    -C                        ( -[2]F)                        ( -[6]F)                    -C                        ( -[2]F)                        ( -[6]F)                    -[0]                }              \chemright]$_n$            \schemestop&   Pfannenbeschichtung (Tephlon), Funktionskleidung (Gortex)\end{tabularx}}\end{document}

Viewing all articles
Browse latest Browse all 6

Trending Articles