Good enough to cope with the average DocBook insanity.
.Sh DESCRIPTION
simple: >\h'0'<
.br
-escape only: >\h'\w'\&''<
+escape only: >\h'\w'\&'M'<
.br
escape at the end: >\h'0+\w'\&''<
.br
-escape at the beginning: >\h'\w'\&'+0'<
+escape at the beginning: >\h'\w'\&'M+0'<
.br
escape in the middle: >\h'0+\w'\&'+0'<
.br
-.\" $OpenBSD: roff.7,v 1.60 2017/05/08 15:33:43 schwarze Exp $
+.\" $OpenBSD: roff.7,v 1.61 2017/06/01 19:05:15 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010,2011,2013-2015,2017 Ingo Schwarze <schwarze@openbsd.org>
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 8 2017 $
+.Dd $Mdocdate: June 1 2017 $
.Dt ROFF 7
.Os
.Sh NAME
.Ss \eH\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
Set the height of the current font; ignored by
.Xr mandoc 1 .
-.Ss \eh\(aq Ns Ar number Ns \(aq
-Horizontal motion; ignored by
-.Xr mandoc 1 .
+.Ss \eh\(aq Ns Ar width Ns \(aq
+Horizontal motion relative to the current position.
+The default scaling unit is
+.Cm m .
.Ss \ek[ Ns Ar name ]
Mark horizontal input place in register; ignored by
.Xr mandoc 1 .
-/* $OpenBSD: mandoc.c,v 1.66 2015/11/12 22:43:30 schwarze Exp $ */
+/* $OpenBSD: mandoc.c,v 1.67 2017/06/01 19:05:15 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015 Ingo Schwarze <schwarze@openbsd.org>
++*end;
return ESCAPE_ERROR;
}
- gly = ESCAPE_IGNORE;
+ gly = (*start)[-1] == 'h' ? ESCAPE_HORIZ : ESCAPE_IGNORE;
term = **start;
*start = ++*end;
break;
-/* $OpenBSD: mandoc.h,v 1.161 2017/06/01 15:24:41 schwarze Exp $ */
+/* $OpenBSD: mandoc.h,v 1.162 2017/06/01 19:05:15 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
ESCAPE_NUMBERED, /* a numbered glyph */
ESCAPE_UNICODE, /* a unicode codepoint */
ESCAPE_NOSPACE, /* suppress space if the last on a line */
+ ESCAPE_HORIZ, /* horizontal movement */
ESCAPE_SKIPCHAR, /* skip the next character */
ESCAPE_OVERSTRIKE /* overstrike all chars in the argument */
};
-/* $OpenBSD: mdoc_term.c,v 1.257 2017/05/30 16:31:25 schwarze Exp $ */
+/* $OpenBSD: mdoc_term.c,v 1.258 2017/06/01 19:05:15 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
if (NODE_EOS & n->flags)
p->flags |= TERMP_SENTENCE;
- p->offset = offset;
+ if (n->type != ROFFT_TEXT)
+ p->offset = offset;
p->rmargin = rmargin;
}
-/* $OpenBSD: term.c,v 1.120 2017/05/07 17:30:58 schwarze Exp $ */
+/* $OpenBSD: term.c,v 1.121 2017/06/01 19:05:15 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
void
term_word(struct termp *p, const char *word)
{
+ struct roffsu su;
const char nbrsp[2] = { ASCII_NBRSP, 0 };
const char *seq, *cp;
int sz, uc;
else if (*word == '\0')
p->flags |= (TERMP_NOSPACE | TERMP_NONEWLINE);
continue;
+ case ESCAPE_HORIZ:
+ if (a2roffsu(seq, &su, SCALE_EM) == 0)
+ continue;
+ uc = term_hspan(p, &su) / 24;
+ if (uc > 0)
+ while (uc-- > 0)
+ bufferc(p, ASCII_NBRSP);
+ else if (p->col > (size_t)(-uc))
+ p->col += uc;
+ else {
+ uc += p->col;
+ p->col = 0;
+ if (p->offset > (size_t)(-uc)) {
+ p->ti += uc;
+ p->offset += uc;
+ } else {
+ p->ti -= p->offset;
+ p->offset = 0;
+ }
+ }
+ continue;
case ESCAPE_SKIPCHAR:
p->flags |= TERMP_BACKAFTER;
continue;