Hi,
Forgive me for this very basic question, but in sending a friend to Nisus to get onboard the Nisus train, I saw the Pro and had to test it out (I was stoked to see I could potentially get rid of the old Word I hate so much because of the new Comments feature). Anyway, I downloaded it yesterday and tested it out on a Word doc that had lots of changes and comments made to it, but I don't see those Comments or changes showing up; just the document itself. I clicked on "Show Comments" of course, but the comments window is blank. Can you point me to what I'm assuming is a very simple solution that I'm not seeing? Thanks!
Laura
don't see Comments when opening Word doc for first time
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: don't see Comments when opening Word doc for first time
Unfortunately you're not missing anything as we don't currently import comments from .doc files. If you really need to get comments from Word into Nisus Writer Pro you'll have to save the file using the RTF format first. Sorry for the trouble.
Re: don't see Comments when opening Word doc for first time
Ah...I see. Well that's one step closer, right? Let me ask this, then: once I convert to RTF, do my own edits and comments and save the document, will a person using Word be able to see what I've done?
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: don't see Comments when opening Word doc for first time
That should work just fine, eg: transferring comments from NWP to Word shouldn't present any problems.
Re: don't see Comments when opening Word doc for first time
Cool. One last question: what about regular edits (changing words so that it shows what was there crossed out and what was added, a la Word)? On the test document I'm working on, when I change the words, it's acting like it's a new document (that is, just letting me change them).
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: don't see Comments when opening Word doc for first time
NWP doesn't track changes of any kind, so creating those kind of editing marks/revisions in NWP won't be possible.
On the flip side, importing an RTF with tracked changes into NWP will show the edits, in a limited form. Specifically deleted text will appear as red strikethrough using a "Deleted" character style.
On the flip side, importing an RTF with tracked changes into NWP will show the edits, in a limited form. Specifically deleted text will appear as red strikethrough using a "Deleted" character style.
Re: don't see Comments when opening Word doc for first time
Shoot. Ah well, I'll keep my dastardly Word on my computer for this awful editing-type stuff, but I look forward to the day when you guys let me bid it good riddance once and for all!
Re: don't see Comments when opening Word doc for first time
It is not the same but a while ago I wrote a macro which might be of your interest. It compares two versions of a document and shows the differences in the following way:llscholes wrote:One last question: what about regular edits (changing words so that it shows what was there crossed out and what was added, a la Word)?
http://www2.odn.ne.jp/alt-quinon/files/ ... pMacro.gif (screenshot)
Before trying it, please read the comments at the top of the macro.
Code: Select all
### DocComp (3.1.7) ###
# This macro compares two open documents (the frontmost and the next) and prodoces an output file in which differences between them are shown in different background colours and strikethrough.
# Difference in style attributes will be ignored as the comparison is done on plain text copies of the target documents.
# The font of the insertion point (or of the first character of the first selection) of the frontmost document will be that of the output file.
# If you want the output file to use always the same font. Replace "$fontName" with the font name. Also you can specify the font size like in the following manner.
# my $diffRTF = `/usr/bin/textutil $options -font Optima -fontsize 12 "$outputTXTPath"`;
# The output file will be opened by Nisus Writer Pro unless $showInAnotherApp is defined. For example, $showInAnotherApp = 'TextEdit' to let TextEdit open it.
# By default, the first (frontmost) document will be treated as older version and the second (next) document as newer. If $frontmostOlder is set to false, the macro compares them in the reverse order: from the second (next) document to the first (frontmost) document.
# When you run the macro, you will be prompted to decide how to compare them: "paragraph by paragraph", "clause by clause" or "word by word".
# This macro uses /usr/bin/diff to compare documents. In "paragraph" mode, the macro lets diff compare the plain text copies of the target documents as they are. In other modes, the macro inserts newline characters in the plain text copies before sending them to diff.
# Probably "clause" is not an appropriate word. Here it means text portion ending with a punctuation mark such as "." ",", "!", "?".
# In this macro, "word" stands for text portion separated by white space, punctuation marks, one or more digit, Japanese kana and those characters themselves. Every Hiragana/Katakana will be treated as a word.
# By default, the output file shows older and removed portions in pink background color and newer and added portions in green background color. You can change the color by modifying numerical values in "/$1\\red187\\green255\\blue220;\\red255\\green200\\blue200;/;" near the end of the macro.
# ATTENTION: The macro assumes that the target documents do not contain "[[+", "+]]", "<<-", "->>" and the very unlikely "###sEpArAtOr###".
$frontmostOlder = true # true: compare from the first document to the second document
# false: compare from the second document to the first document
$showInAnotherApp = '' # put another applicatin name between the quotes if you want
# the output file to be opened by that application.
# Otherwise, leave it empty.
Require Application Version '3.1' # require Nisus Writer Pro 1.1 (3.1 is an internal version number)
Debug.setDestination 'none'
Debug.setIncludePerl true
$docs = Document.openDocuments # get all open documents and put them in $docs (array)
if $docs.count < 2
Exit 'Two open documents are indispensable for comparing them, exit...'
end
$sel = $docs[0].textSelection # get the TextSelection object of the first selection in the frontmost document and put it in $sel
$displayAttr = $sel.text.displayAttributesAtIndex $sel.location # get the attributes object of the selection start and put it in $displayAttr
$fontName = $displayAttr.fontFamilyName # get the font family name of the selection start and put it in $fontName
if $frontmostOlder == false # false: compare from the second document to the first document
$docs.swapValuesAtIndexes 0, 1 # swap the first document and the second document in $docs
end
$docName = $docNameWithoutExtension = $tempPath = Array.new # initialize three arrays
$i = 0
while $i < 2
$path = $docs[$i].filePath # get the path of $doc[$i]
if $path == undefined # then, it is an unsaved new document
$docName[$i] = $docNameWithoutExtension[$i] = $docs[$i].displayName
else
$docName[$i] = $path.lastFilePathComponent
$docNameWithoutExtension[$i] = $path.lastFilePathComponentWithoutExtension
end
$textFileName = $docNameWithoutExtension[$i] & '.txt' # construct the file name of a temporary text file
$tempPath[$i] = File.temporaryPathWithName $textFileName # get the path for the file
$plainText = $docName[$i] & "\n\n" # put the file name (or display name) in $plainText
$plainText &= Cast to String $docs[$i].text # make $doc[$i] plain text and add it to $plainText
$check = File.writeDataToPath $plainText, $tempPath[$i] # write $plainText to the path
if $check == false # unable to create $tempPath[$i]
$path = $tempPath[$i]
Exit "Cannot create \"$path\", exit..."
end
$i += 1
end
$message = 'Compare ' & $docName[0] # construct $message to be shown in the Macro Prompt
$message &= ' and ' & $docName[1]
$detail = "Select the comparison mode:" # define $detail to be shown in the Macro Prompt
$modes = Array.new 'paragraph', 'clause', 'word' # define $modes to be shown in the Macro Prompt
$mode = Prompt Options $message, $detail, 'OK', $modes # prompt the Macro Prompt dialog and get the option chosen by the user
$outputFileName = $docNameWithoutExtension[0] & '-' # construct the output file name
$outputFileName &= $docNameWithoutExtension[1]
$outputTXTPath = File.temporaryPathWithName "$outputFileName.txt" # get the path of the output text file
$outputRTFPath = File.temporaryPathWithName "$outputFileName.rtf" # get the path of the output RTF file
Set Exported Perl Variables 'mode', 'tempPath', 'outputTXTPath', 'outputRTFPath', 'fontName', 'showInAnotherApp'
begin Perl
my $NisusPl = `cat "$0"`; utf8::decode $NisusPl; print $NisusPl; # for debug
my $i = 0;
if ( $mode ne 'paragraph') {
foreach $file (@tempPath) {
open IN, "<:utf8", $file; # open one of the temporary text files
undef $/; # slurp mode
my $str = <IN>; # put the whole content of this text file in $str
close IN; # close this text file
if ( $mode eq 'clause' ) {
$str =~ s/(?x)
(?=[\n\f\t\x{2028}\p{Pi}\p{Ps}]) |
(?<=[\f\t\x{2028}\p{Pf}\p{Pe}\p{Po}])
/###sEpArAtOr###\n/g;
} else {
$str =~ s/(?x)
(?=[\n\f\t\x20\xA0\x{3000}\p{Pi}\p{Ps}]) |
(?<=[\f\t\x20\xA0\x{3000}\p{Pf}\p{Pe}\p{Po}]) |
(?<!\p{Hiragana})(?=\p{Hiragana}) |
(?<=[\p{Hiragana}\p{Katakana}]) |
(?<!\p{Katakana})(?=\p{Katakana})
/###sEpArAtOr###\n/g;
}
open OUT, ">:utf8", $file; # open the same text file to overwrite it
print OUT $str; # write $str (file content converted by s///g) to the file
close OUT; # close the file
++$i;
}
}
my $options = "--old-group-format='<<-%<->>'"; # construct options for diff
$options .= " --new-group-format='[[+%>+]]'";
$options .= " --unchanged-group-format='%='";
$options .= " --changed-group-format='<<-%<->>[[+%>+]]'";
my $diffTXT = `/usr/bin/diff $options "$tempPath[0]" "$tempPath[1]"`; # execute diff and put the output in $diffTXT
unlink $tempPath[0], $tempPath[1]; # delete the temporary text files
utf8::decode $diffTXT; # validate $diffTXT as encoded in UTF-8
if ( $mode ne 'paragraph') {
$diffTXT =~ s/###sEpArAtOr###\n//g; # remove all "###sEpArAtOr###\n"
}
open DIFFTXT, ">:utf8", $outputTXTPath; # open $outputTXTPath
print DIFFTXT $diffTXT."\n"; # append \n, print $diffTXT to $outputTXTPath
close DIFFTXT;
$options = '-convert rtf -stdout -inputencoding UTF-8'; # define options for textutil, reusing $options
my $diffRTF = `/usr/bin/textutil $options -font "$fontName" "$outputTXTPath"`; # put the output in $diffRTF
unlink $outputTXTPath; # delete $outputTXTPath
$diffRTF =~ s/(?x)({\\colortbl;\\red255\\green255\\blue255;)
/$1\\red187\\green255\\blue220;\\red255\\green200\\blue200;/; # add color tables 2 and 3
$diffRTF =~ s/\[\[\+/\\cb2\x20/g; # background color 2
$diffRTF =~ s/\+\]\]/\\cb1\x20/g;
$diffRTF =~ s/<<-/\\cb3\x20\\strike\x20/g; # background color 3 with strikethrough
$diffRTF =~ s/->>/\\cb1\x20\\strike0\\striked0\x20/g;
open DIFFRTF, ">", $outputRTFPath; # open $outputRTFPath
print DIFFRTF $diffRTF; # write $diffRTF to $outputRTFPath
if ( $showInAnotherApp ne '' ) {
`/usr/bin/open -a "$showInAnotherApp" "$outputRTFPath"`;
}
end
if ! $showInAnotherApp
Open $outputRTFPath # open the output file ($outputRTFPath) in Nisus Writer Pro
end
http://www2.odn.ne.jp/alt-quinon/files/ ... mp_nwm.zip
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: don't see Comments when opening Word doc for first time
Wow, quite a macro Kino! Thanks for sharing.