dir: support text direction with .>>, .<<, \> and \<
commitd81da34389f192fee51865798fc86ff7e521617a
authorAli Gholami Rudi <ali@rudi.ir>
Wed, 15 May 2013 17:15:14 +0000 (15 21:45 +0430)
committerAli Gholami Rudi <ali@rudi.ir>
Thu, 23 Nov 2017 08:08:39 +0000 (23 11:38 +0330)
treed08018a44c24f15372d5a59c69f1017da3ff4d9f
parent5d3333450b2456279531d67e9ca11ce08446da9a
dir: support text direction with .>>, .<<, \> and \<

The following troff requests specify text direction:

* .<< and .>> change the direction of text (.<< for r2l and .>>
  to l2r); the default direction is l2r.
* \< and \> change text direction temporarily.

Text direction processing starts after the first invocation
of .>> or .<<.

As an example, one can write:

  .<<
  This is a paragraph in a right-to-left language
  with some embedded \>left-to-right words\< in it.
  .>>

The current text direction and temporary direction are available
through .td and .cd number registers respectively; 0 for l2r and 1 for
r2l.

To indent the right side of output lines, two new requests have been
added: .in2 and .ti2 are equivalent to .in and .ti but for the right
side.  The .I number register stores the current right-side
indentation.
Makefile
char.c
dir.c [new file with mode: 0644]
fmt.c
reg.c
ren.c
roff.c
roff.h
tr.c
wb.c