-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing examples in the demo directory #19
Comments
mtbakerguy ***@***.***> wrote:
It's not clear how (if?) you can do the following:
- insert a unicode character (e.g. \spade) into the output.
You can either insert the UTF-8 character of use Troff character
aliases (like \(xy or \[xyz]); see font descriptions for their names
of the latter (like neatroff_make/devutf/R).
For spade there is no character alias, so you can insert ♠ in your
documents. You can also define character alises using commands like
ochar or fmap.
- color the text that represents a link: \*[post.url http://litcave.rudi.ir/ \m[green]boohoo\m[]]
Correct.
- combine the two \*[post.url http://litcave.rudi.ir \m[green]\spade\m[]]
That is OK too:
\*[post.url "http://litcave.rudi.ir" "\m[green]♠\m[]"]
Or you can define your own macro:
.ds myurl "\\*[post.url "\\$1" "\m[green]\\$2\m[]"]
And use:
\*[myurl "http://litcave.rudi.ir" "♠"]
- using the above three -- put them in as a table cell
- have multiple word text: \*[post.url http://litcave.rudi.ir "hello world"]
It is better to use non-breakable space:
\*[myurl "http://litcave.rudi.ir" "hello\~world"]
If these are possible, adding something to the demo directory or as
a FAQ section in the documentation would be helpful.
Maybe an examples section in neatroff.pdf or neatstart.pdf
would be a good start. What is your opinion?
Ali
|
I think the main document is a better place as it's more comprehensive. |
If the header can be made to work correctly, the attached would make a complex example: |
mtbakerguy ***@***.***> wrote:
If the header can be made to work correctly, the attached would make a complex example:
[jh.txt](https://github.com/aligrudi/neatroff_make/files/7072078/jh.txt)
I think a tutorial that introduces Troff with an emphasis on
Neatroff helps very much. neatroff.pdf is mostly a reference
and I think a new section in neatstart.pdf makes more sense.
I suggest covering the following topics in 3 or 4 pages:
+ The first Troff document; UTF-8 input
+ Changing fonts, font size, and font colour
+ Defining macros with .de and single-line macros with .ds
+ Drawing commands
+ Using packages
+ Including images and URL (-mpost)
+ Maybe using -mtbl to draw simple tables (instead of the tbl preprocesor)
+ Maybe using -mgr to draw simple charts
Ali
|
All of those would be helpful and you're right that neatstart.pdf works well. I'd never looked at tmac.tbl before. It looks reasonably simple. How hard would it be to remove the 7-column limitation? I took a quick look at tmac.gr. Examples would definitely help as, in contrast with tmac.tbl, it's not clear to me how I'd use it. |
mtbakerguy ***@***.***> wrote:
All of those would be helpful and you're right that neatstart.pdf works well.
I'd never looked at tmac.tbl before. It looks reasonably simple.
How hard would it be to remove the 7-column limitation? I took a
It can be removed using macro recursive calls (with the help of
shift request), but the simplicity may suffer.
quick look at tmac.gr. Examples would definitely help as, in contrast
with tmac.tbl, it's not clear to me how I'd use it.
I find it useful when drawing simple charts. Two small examples:
.grclr #036 #289
.de grbar2
. grbar \\$1 \\$2
. grtxt \\$1 \\$2-300 \s-2\m[#f]\\$2\m[]\s+2
.
.grbeg "xmin 04" "xmax 126" "ymin 0" "ymax 11400" "barwid 6"
. grlab.x "Month" +1m
. grlab.y "Value" -1m
. grnum 10 "99/1"
. grnum 20 "99/2"
. grnum 30 "99/3"
. grnum 40 "99/4"
. grnum 50 "99/5"
. grnum 60 "99/6"
. grnum 70 "99/7"
. grnum 80 "99/8"
. grnum 90 "99/9"
. grnum 100 "99/10"
. grnum 110 "99/11"
. grnum 120 "99/12"
. grval 2000 "2M" 1
. grval 4000 "4M" 1
. grval 6000 "6M" 1
. grval 8000 "8M" 1
. grval 10000 "10M" 1
. grbar2 10 2367
. grbar2 20 6781
. grbar2 30 3083
. grbar2 40 6713
. grbar2 50 8299
. grbar2 60 3612
. grbar2 70 3840
. grbar2 80 3192
. grbar2 90 2730
. grbar2 100 4254
. grbar2 110 9026
. grbar2 120 11242
. nr grbarwid 8
. grclr #036 #2a9
. grbar2 12 6274
. grbar2 22 3068
. grbar2 32 3966
. grbar2 42 4845
. grbar2 52 4311
. grbar2 62 2577
.grend
.grclr #036 #fff
.grbeg "xmin 0" "xmax 100" "ymin 0" "ymax 200"
. grnum 0 "0" 1
. grnum 20 "20" 1
. grnum 40 "40" 1
. grnum 60 "60" 1
. grnum 80 "80" 1
. grnum 100 "100" 1
. grval 50 "5" 1
. grval 100 "10" 1
. grval 150 "15" 1
. grval 200 "20" 1
. grcurbeg
. grcur 0 46
. grcur 10 50
. grcur 20 70
. grcur 30 94
. grcur 40 110
. grcur 50 120
. grcur 60 154
. grcur 70 166
. grcur 80 164
. grcur 90 156
. grcur 100 150
. grcurend
. grclr #630 -
. grcurbeg
. grcur 0 40
. grcur 100 156
. grcurend
.grend
Ali
|
There's a typo in the grbar2 declaration...missing a second period. |
mtbakerguy ***@***.***> wrote:
There's a typo in the _grbar2_ declaration...missing a second period.
Maybe it is due to mail servers/clients escaping periods that
appear at the beginning of lines.
Ali
|
I finally decided that a Troff file in demo/ would be more
interesting. Have a look at demo/demo1.tr. It is incomplete; patches
are welcome. Anything important (but basic) missing?
I also plan to add demo/demo2.ms to introduce macro packages like
-mpost, -mtbl, -mgr, and maybe briefly -ms. Patches are welcome here
too.
Maybe it is a good idea to dedicate another file to preprocessors
like eqn and pic?
Ali
|
It's not clear how (if?) you can do the following:
If these are possible, adding something to the demo directory or as a FAQ section in the documentation would be helpful.
The text was updated successfully, but these errors were encountered: