Quantcast
Channel: Tabularx: Column smaller than text - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 6

Answer by Mico for Tabularx: Column smaller than text

$
0
0

In addition to prefixing the X column type with a \hspace{0pt} directive to enable hyphenation -- see also David's answer -- you may want to create a list of acceptable hyphenation patterns, as the babel/ngerman combination tends not be informed all that well about how words such as "Polyvenylchlorid" and "Polyethafluorethen" might be hyphenated acceptably.

enter image description here

\documentclass[a4paper, 12pt]{scrartcl}\usepackage[T1]{fontenc} % to list words with Umlauts in arg. of '\hyphenation'\usepackage[ngerman]{babel}\usepackage{tabularx,ragged2e}\newcolumntype{L}{>{\hspace{0pt}\RaggedRight}X}\renewcommand\tabularxcolumn[1]{m{#1}}\usepackage{chemfig}% 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}\begin{tabularx}{\textwidth}{|L|c|c|L|}    Name & Monomer & Polymermolekül & Einsatzbeispiel\\    \hline    Polyethen (PE)  &             \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) & \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)&         \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) &         \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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>