LaTeX forum ⇒ Text FormattingvSpace in tablecell comes after following text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
redted
Posts: 5
Joined: Sat Jul 17, 2010 8:32 pm

vSpace in tablecell comes after following text

Postby redted » Tue Aug 03, 2010 10:25 am

Hi,

I try in to do something like this within a p-type table cell

  1. {\vspace{3pt}}\begin{small}\emph{\glsentryuseri{##1}}\end{small}


(I use the glossaries package, thats where \glsentryuseri comes from). However the Space created by vspace ends up after the first line of the text from inside the small-block. I would like to create the space before the paragraph. The "{}" arround vspace was an attempt to force the space before the text. The problem might be related to the fact that i try to insert hte vspace within a glossary styledefinition and that i have no idea of expansion order/control.

Greetings and thanks in advance Ted


Minimal example (not wuite minimal but pretty close):

  1. \documentclass{scrreprt}
  2. \usepackage[latin1]{inputenc}
  3. \usepackage[toc,nomain]{glossaries}
  4.  
  5. \usepackage{ifmtarg}
  6.  
  7. \makeatletter
  8. \newcommand*{\ifuseriempty}[3]{%
  9. \protected@edef\tmp{\glsentryuseri{#1}}%
  10. \expandafter\@ifmtarg\expandafter{\tmp}{#2}{#3}%
  11. }
  12. \makeatother
  13.  
  14. \newglossarystyle{acronymAndExplanation}{%
  15. \glossarystyle{long}
  16. % put the glossary in a longtable environment:
  17. \renewenvironment{theglossary}{\begin{longtable}{lp{\glsdescwidth}}}{\end{longtable}}%
  18. \renewcommand*{\glossaryheader}{}%
  19. \renewcommand*{\glsgroupheading}[1]{}%
  20. \renewcommand*{\glossaryentryfield}[5]{\bfseries{\glstarget{##1}{##2}} & ##3 \\
  21. \ifuseriempty{##1}%
  22. {}%
  23. { &{\vspace{3pt}}
  24. \begin{small}\emph{\glsentryuseri{##1}}\end{small}\\}%
  25. }
  26. % Nothing between groups:
  27. %\renewcommand*{\glsgroupskip}{& \\}%
  28. }
  29. \newglossary[abkuerzungen]{abk}{abkin}{abkout}{Abkürzungsverzeichnis}
  30. \makeglossaries
  31.  
  32. \newacronym[type=abk]{abc}{abc}{Alphabet}
  33. \newacronym[type=abk,user1={my longer description, which needs multiple lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam fermentum porttitor turpis, viverra gravida est dignissim ut. Nulla vitae nisi eu nisi scelerisque congue eu vel lacus. Etiam consectetur nunc ac turpis fermentum pulvinar. Curabitur bibendum sodales leo et fringilla.}]{abba}{abba}{Band}
  34.  
  35. \glsaddall
  36.  
  37. \begin{document}
  38.  
  39. \printglossary[type=abk,nonumberlist,style=acronymAndExplanation]
  40.  
  41. \end{document}


Edit: Added PDF showing the problem (generated by minimal example code above)

If my question is unclear or I violated a forum rule please ask or tell me. I tried searching but i might have used the wrong search terms
Attachments
minimalExample.pdf
Shows the misplaced spacing. I would like the gap between "band" and "my long..." instead of between "my long..." and "ipsum dolor sit ..." where it is at the moment
(46.19 KiB) Downloaded 107 times

Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 4 guests