diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-05-03 20:42:45 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-05-03 20:42:45 +0000 |
| commit | 79674a1dec86c6ccddc94271e4aaa84ed9e94b3b (patch) | |
| tree | f66a2e8170a047fac96ed099b54d9b6771ddcd8c /docutils/tools | |
| parent | 39c1ca091d56066a83a0a429b99e956b539bddab (diff) | |
| download | docutils-79674a1dec86c6ccddc94271e4aaa84ed9e94b3b.tar.gz | |
improved handling of long field names
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@3288 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools')
| -rw-r--r-- | docutils/tools/stylesheets/latex.tex | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/docutils/tools/stylesheets/latex.tex b/docutils/tools/stylesheets/latex.tex index 0cc4d9ac7..c2a5c935d 100644 --- a/docutils/tools/stylesheets/latex.tex +++ b/docutils/tools/stylesheets/latex.tex @@ -450,7 +450,18 @@ \providecommand{\DNfieldlist}[1]{% \Dtwocolumntable{#1}% } -\providecommand{\DNfieldname}[1]{\Dformatfieldname{#1}&} +\Dprovidelength{\Dmaxfieldnamewidth}{8em}% +\Dprovidelength{\Dplaceholderfieldnamewidth}{2em}% +\Dprovidelength{\Dfieldnamewidth}{0pt}% +\providecommand{\DNfieldname}[1]{% + \settowidth{\Dfieldnamewidth}{\Dformatfieldname{#1}}% + \ifthenelse{\lengthtest{\Dfieldnamewidth>\Dmaxfieldnamewidth}}{% + \makebox[\Dplaceholderfieldnamewidth][l]{\Dformatfieldname{#1}}% + &\tabularnewline~&% + }{% + \Dformatfieldname{#1}&% + }% +} \providecommand{\DNfieldbody}[1]{#1\tabularnewline} |
