I want to position a bytefield at the right side of the page. For that reason I use the wrapfig package. If I make the wrapfigure smaller than 0.8\textwidth it doesn't work. If it's 0.8\textwidth (or even wider) it looks crappy.
\newcommand{\messagestart}{\begin{wrapfigure}[p] \begin{centering} \begin{bytefield}[bitwidth=2em]{8} \\}
\newcommand{\messageend}[1]{\end{bytefield} \par\end{centering} \protect\caption{#1} \label{#1} \end{wrapfigure} }
I tried to reduce the bitwidth, but it still didn't go smaller than 0.8\textwidth. Is it anyhow possible to make it at least 0.5\textwidth?
Edit: Here's an example:
\documentclass[a4paper,ngerman,naustrian,DIV=12,BCOR=1cm]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{wrapfig}
\usepackage{bytefield}
\begin{document}
\chapter{Request}
\messagestart
\bitheader{0-7} \\
\begin{rightwordgroup}{Type}
\wordbox[tlr]{1}{0}
\end{rightwordgroup} \\
\begin{rightwordgroup}{Data}
\wordbox[tblr]{4}{Data, 64 Bytes}
\end{rightwordgroup}
\messageend{Request}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\end{document}

\centeringis a command.centeringis not an environment. Perhaps you wanted thecenterenvironment.bytefieldis not a standard environment (and I've no idea where you have it from).wrapfigureand\glsboth require packages (they aren't standard either). – cfr Apr 05 '15 at 00:02\newcommand{\messagestart}{\begin{wrapfigure}{r}{0.5\textwidth} \centering \begin{bytefield}[bitwidth=2em]{8} } \newcommand{\messageend}[1]{\end{bytefield} \par \protect\caption{#1} \label{#1} \end{wrapfigure} }. – Apr 05 '15 at 00:38