tempname junk
file open `junk' using junk.tex, write replace
file write `junk' " Tamas \\" _n
file write `junk' " Bartus \\" _n
file close `junk'
type junk.tex
Works for me on Window and produces the desired double backslash
Tim
2010/1/30 Dr. Bartus <[email protected]>:
> Kit Baum wrote that
>
>>I don't see why one needs to do anything to avoid writing double backslashes:
>>. file open `junk' using junk.tex, write replace
>>. file write `junk' " Tamas \\" _n
>>. file write `junk' " Bartus \\" _n
>>. file close `junk'
>
> Am I right that you are using Unix? I am using Windows.
> What surprises me that Roy's method of macro substituion works,
> but typing double backslash doesn't.
>
> My guess is that \\ in Windows is a special character, meaning
> it is reserved for specifying path names or accessing network places.
> And to get \\ into the output file, poor Windows users should type something different.
> But I failed to discover, what...
>
> Maybe people at StataCorp know the answer....
>
> Tamas
>
> ------------------------------------------------
>
> Tamas Bartus, PhD
> Associate Professor, Institute of Sociology and Social Policy
> Corvinus University, Budapest
> 1093 Budapest, Közraktár utca 4-6.
> Phone: +36-1-482-7301
> Fax: +36-1-482-7348
> Homepage: http://web.uni-corvinus.hu/bartus
>
> *
> * 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/
>
*
* 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/