Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: problem with print and translate


From   Matthijs De Zwaan <[email protected]>
To   [email protected]
Subject   st: problem with print and translate
Date   Fri, 21 Jan 2011 13:44:31 +0100

Dear Stata-listers,

I'm having problems with printing and translating my log-files. I am
working with Stata 11.1 on a Mac.

When I print my log-files, my printer always eats one or two lines
from the top and bottom (using Apple's pdf-printer to print the file
as a pdf gives me the same problem). SInce this was starting to annoy
me, I started using -translate- to translate my .smcl files to
pdf-files. If this works, it works great. However, it does not always
work, and I don't understand why.

A simple example may help. I experimented with:
** test.do **
version 11.1
clear all
cap log close smcl
cap log close log
cap log close translate
cap mkdir "~/Desktop/test folder"
cd "~/Desktop/test folder"
log using log.smcl, replace name(smcl)
log using log.log, replace name(log)
di "This is a log"
log close smcl
qui log using translate.log, replace name(translate)
/* 1 */ translate "log.smcl" "log.pdf", translator(smcl2pdf) replace
/* 2 */ translate "log.smcl" "log test.pdf", translator(smcl2pdf) replace
/* 3 */ translate "log.smcl" "~/Desktop/test folder/log.pdf",
translator(smcl2pdf) replace
ls *
qui log close translate
exit
************
When I do this in the command line, it usually  works if I use the
line labeled 1 for translation. From the do-file, nothing works, not
even 1. Commands 2 and 3 never work, not even from the command line.
The same things happen when using .log instead of smcl, and the
log2pdf translator. After running the do-file, even command 1 does not
always work anymore from the command line, even if it worked before.

translate.log shows the following:
** translate.log **
. /* 1 */ translate "log.smcl" "log.pdf", translator(smcl2pdf) replace
(note: file log.pdf not found)

. /* 2 */ translate "log.smcl" "log test.pdf", translator(smcl2pdf) replace
(note: file log test.pdf not found)

. /* 3 */ translate "log.smcl" "~/Desktop/test folder/log.pdf",
translator(smcl2pdf) replace

. ls *

-rw-r--r--  1 matthijsdezwaan  staff  935 Jan 21 13:33 log.log
-rw-r--r--  1 matthijsdezwaan  staff  723 Jan 21 13:33 log.smcl
-rw-r--r--  1 matthijsdezwaan  staff  738 Jan 21 12:01 test.do
-rw-r--r--  1 matthijsdezwaan  staff  347 Jan 21 13:33 translate.log

. qui log close translate
**************

Is this a bug in Stata, or am I misunderstanding how the commands
work? Is there anything I can do to make this work?

Thanks once again for your help
Matthijs

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index