This document applies at all levels of AIX.
You are changing your tab stop to 12 characters in vi and you want to print the file with this change.
You would like your file to look like this:
12345678901234567890
Column one Column 2
But the virtual printer may print this like:
123456789012345678901234567890
Column one Column 2
Things can really get much worse. The virtual
printer turns the tabs into spaces and this is controlled by the wh attribute.
lsvirprt choose the appropriate queue. When prompted by: To LIST attributes, enter AttributeName1 ... To CHANGE an attribute value, enter AttributeName=NewValue To FORMAT and EDIT an attribute value, enter AttributeName~v To EDIT the attribute file, enter ~v To terminate, press Enter: wh~v type 'wh~v'This will put you in a vi session to edit the wh attribute, and the screen will look like this:
Current Horizontal Tab Settings (terminated by null) wh = %{9}%Px%{28}%Py%?%gy%t%wy%gx%c%gx%{8}%+%Px%;%;\0 %{9} PUSH: (Integer Constant 9) %Px POP -> Internal Variable x %{28} PUSH: (Integer Constant 28) %Py POP -> Internal Variable y %? <IF> %gy PUSH: (Internal Variable y) %t <THEN> %wy <WHILE> Loop (Counter is in Internal Variable %c) %gx PUSH: (Internal Variable x) %c POP -> Low-Order Byte -> OUTPUT %gx PUSH: (Internal Variable x) %{8} PUSH: (Integer Constant 8) %+ PUSH: (pop2 + pop1) %Px POP -> Internal Variable x %; <END> %; <END> '\0'
The constant 9 is the variable for the first tab column, and the constant 8 is the distance between tabs.
To have the first tab at column 50 with tabs 10 apart, change this to:
%{50} PUSH: (Integer Constant 9) <--- 1st column %Px POP -> Internal Variable x %{28} PUSH: (Integer Constant 28) %Py POP -> Internal Variable y %? <IF> %gy PUSH: (Internal Variable y) %t <THEN> %wy <WHILE> Loop (Counter is in Internal Variable %c) %gx PUSH: (Internal Variable x) %c POP -> Low-Order Byte -> OUTPUT <---- Gets send to the formatter. %gx PUSH: (Internal Variable x) %{10} PUSH: (Integer Constant 8) <---- between columns %+ PUSH: (pop2 + pop1) %Px POP -> Internal Variable x <---- Build the next column %; <END> %; <END> '\0'If you want to set the tabs at particular columns, you could set the columns by specifying the column number in the command %{##} (where ## is the column) and using the %c byte output flag, and then null terminating the parameters. The following example sets the tabs at 10, 20, and 45 columns.
%{10}With this information you should now be able to get the virtual printer to obey your tabs. The other way to solve the problem is to move the tabs to the printer and let it add them. You can do this if you put the virtual printer in passthrough mode and add carriage returns to each line or send a command to have the printer add the lines. You may find it easier to make these simple changes to your virtual printer.
%c
%{20}
%c
%{45}
%c
'\0'
[ Doc Ref: 9179093479684 Publish Date: Feb. 13, 2001 4FAX Ref: 6443 ]