I'm formatting some output with the following method:
(defmethod format-word ((unit word_1)&key (stream t))
(let ((concept (get-concept unit)))
(format stream "(~a:~a)~9t~A~37T~A~63T~a~87T~A~118t~A~%"
(if concept (length (concept-species concept)) "na")
(length (entity-differentia-of (get-entity unit)))
(express unit)
(part-of-speech unit)
(express (get-language unit))
(if concept (express (genus concept)) "na")
(if concept (express (differentia concept))
(get-description unit))
)))
But the columns never seem to line up correctly. Some of the elements tab
correctly, some don't. Here are 5 sample lines:
5. (3:0) das Genus das Substantiv das Deutsch
die Klassifikation of substantives originally according to
distinctions in sex
6. (3:7) das Genus das Substantiv das Deutsch
positive that is commensurate with the subject Konzept
and is predicable of additional objects
7. (3:0) das Geschlecht das Substantiv das Deutsch
die Klassifikation of substantives originally according to
distinctions in sex
8. (1:9) das Konzept das Substantiv das Deutsch
die Auffassung of the essence of a class of existents that is
symbolized and retained
9. (1:2) das Substantiv das Substantiv das Deutsch
substantive that is a single Wort not derivative of a
verb
10. (2:4) das Wort das Substantiv das Deutsch
expression used in a Sprache as a combination of vocal
sounds or one su
Any advice would be greatly appreciated.
Thanks!
Fred Gibson, Architect
·········@gibson-design.com Architecture Designed Objectively
==================================-----------||||||||||||||||||||||
Frederick Clifford Gibson Architect & Associates
1220 14th Avenue Suite 106
San Francisco, CA 94122
415.753.3797 |tel| 415.759.8848 |fax|
(c)1999 http://www.gibson-design.com
ART: Temple of Triumph *Building* Project
http://www.art-21.org/Temple
EASG: Epistemology-Aesthetics Study Group
http://www.gibson-design.com/philosophy
"Frederick C. Gibson, Architect" <·········@gibson-design.com> writes:
> I'm formatting some output with the following method:
>
> (defmethod format-word ((unit word_1)&key (stream t))
> (let ((concept (get-concept unit)))
> (format stream "(~a:~a)~9t~A~37T~A~63T~a~87T~A~118t~A~%"
> (if concept (length (concept-species concept)) "na")
> (length (entity-differentia-of (get-entity unit)))
> (express unit)
> (part-of-speech unit)
> (express (get-language unit))
> (if concept (express (genus concept)) "na")
> (if concept (express (differentia concept))
> (get-description unit))
> )))
>
> But the columns never seem to line up correctly. Some of the elements tab
> correctly, some don't. Here are 5 sample lines:
Hmmm, I took 3 of your lines, and put the data into three format
expressions like this:
(progn
(terpri)
(format t "(~a:~a)~9t~A~37t~A~63t~a~87t~a~118t~A~%" 3 0
"das Genus" "das Substantiv" "das Deutsch" "die Klassifikation"
"of substantives originally according to distinctions in sex")
(format t "(~a:~a)~9t~A~37t~A~63t~a~87t~a~118t~A~%" 3 7
"das Genus" "das Substantiv" "das Deutsch" "positive"
"that is commensurate with the subject Konzept and is...")
(format t "(~a:~a)~9t~A~37t~A~63t~a~87t~a~118t~A~%" 2 4
"das Wort" "das Substantiv" "das Deutsch" "expression"
"used in a Sprache as a combination of vocal sounds or one su")
(values))
And it seems to produce lines that line up properly in all the usual
implementations. You might try the sample code above, to test your
implementation. If that works alright, the problem lies somewhere
else. Two possible explanations:
a) If some of the strings you provide to format contain spaces at the
end, that might mess up alignment, e.g.:
(format t "(3:0)~9t~A~37t~A~%" "das Genus" "xxx")
(format t "(3:0)~9t~A~37t~A~%" "das Genus " "xxx")
=>
(3:0) das Genus xxx
(3:0) das Genus xxx
b) The formatting might get messed up later on...
Regs, Pierre.
--
Pierre R. Mai <····@acm.org> http://www.pmsf.de/pmai/
The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein