4

Minimal working example:

\documentclass{scrartcl}

\usepackage{fontspec}
\setmainfont{Linux Libertine O}

\usepackage{graphicx}

\usepackage{tikz}

% correct spelling and hyphenation
\usepackage{polyglossia}
\setdefaultlanguage[babelshorthands=true, spelling=new]{german}
\usepackage[german]{translator}

% nicer paragraphs
\setlength{\parindent}{0px}
\setlength{\parskip}{1em}

\title{Ämterliste}

\begin{document}

\(\vcenter{\hbox{\begin{tikzpicture}
\node at (0, 0) {\textbf{\huge S}};
\end{tikzpicture}}}\)\qquad\textsc{\Large Ökumenisches Studentenwohnheim Clausthal}

\end{document}

You may notice the offset of the text compared to the inline graphics, caused by the absence of descents (that wouldn't even be there in a non-capitalized font). Is there a way to make it look nicely aligned besides the obvious manual correction?

Note that I use lualatex, although it probably doesn't make a difference.

0

1 Answer 1

2

no need for using tikZ. A simple \parbox does it:

\documentclass{scrartcl}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage{graphicx}

\begin{document}
\parbox[t]{1em}{\vspace{0pt}%  for vertical alignment
  \textbf{\huge S}}\parbox[t]{\dimexpr\linewidth-1em}{\vspace{0pt}% dito
    \scshape\Large Ökumenisches Studentenwohnheim Clausthal}

\parbox[t]{3em}{\vspace{0pt}%
  \textbf{\huge S}}\parbox[t]{\dimexpr\linewidth-3em}{\vspace{0pt}%
    \scshape\Large Ökumenisches Studentenwohnheim Clausthal}

\parbox[t]{3em}{\vspace{0pt}%
  \includegraphics[width=2em]{tiger}}\parbox[t]{\dimexpr\linewidth-3em}{\vspace{0pt}%
    \scshape\Large Ökumenisches Studentenwohnheim Clausthal}
\end{document}

enter image description here

3
  • I'm guessing the OP simplified their MWE for our benefit, but that the use of an inline graphic is an essential part of their problem. I could be wrong. I guess we'll see what the OP says. Feb 27, 2014 at 12:54
  • You're right - it's not only an "S" I want to display with tikZ.
    – chaosflaws
    Feb 27, 2014 at 13:50
  • @chaosflaws: that makes no difference ...
    – user2478
    Feb 27, 2014 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .