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

From |
Thomas Jacobs <thomasjacobs@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: A couple of file command questions for writing a .tex program |

Date |
Thu, 16 Apr 2009 17:18:39 -0500 |

Benn, Thanks. I had wondered if that was where to focus my effort - on finding another way to enter math mode without using $. Solving these problems always seems like rolling the dice on what will lead to the quickest fix given how large the state space is. Good to know in any case. Tom On Thu, Apr 16, 2009 at 4:37 PM, Ben Jann <ben.jann@gmail.com> wrote: > Re 2, Nick mentioned that "\$" will help. An alternative solution is > to use \( ... \) for LaTeX math instead of $ ... $. > ben > > On Thu, Apr 16, 2009 at 9:14 PM, Thomas Jacobs <thomasjacobs@gmail.com> wrote: >> Fellow listers, >> >> I am trying to learn to write Latex files from Stata/Mata with the >> file commands and have a couple of questions: >> >> 1. What is the difference between using simple quotes " xxx " >> compared with `" xxx "' type quotes? The user manual displays simple >> quotes for write commands >> >> file write handle "first part is" >> >> while in the Gini/Pasquini' Automatic Generation of Document article >> from Stata Journal vol 6 number 1, the typical example >> uses a format like, >> >> file write handle `"first part is"' >> >> I would like to know how they are treated differently, if at all. >> >> 2. A more complicated question. How does one use a $ sign in a file >> write command and not have Stata treat it as a global macro? For >> instance, the end of the following command: >> >> file write tex "\begin{tabular}{lrrrrrrrrrrr}\hline\\ \scriptsize >> Model & `: word 1 of `:colname e(b)'' & p-val & " >> file write tex "`: word 2 of `:colname e(b)'' & p-val & `: word 3 of >> `:colname e(b)'' & p-val & `: word 4 of `:colname e(b)'' & " >> file write tex "p-val & `: word 5 of `:colname e(b)'' & p-val & adj. >> $R^2$ \\" _n >> file write tex "\vspace{0.05in}" _n >> >> generates: >> >> \begin{tabular}{lrrrrrrrrrrr}\hline\\ \scriptsize Model & FFMkt & >> p-val & SMB & p-val & HML & p-val & UMD & p-val & _cons & p-val & adj. >> ^2$ \\ >> >> and I end up with ^2$ as opposed to the $R^2$ term I need for a Latex >> math string. I also tried >> >> `=char(35)'R^2$ >> >> without any change in results. Any suggestions would be much appreciated. >> >> Thanks, >> >> Tom >> >> >> >> -- >> Thomas Jacobs >> * >> * 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/ > -- Thomas Jacobs * * 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/

**References**:**st: A couple of file command questions for writing a .tex program***From:*Thomas Jacobs <thomasjacobs@gmail.com>

**Re: st: A couple of file command questions for writing a .tex program***From:*Ben Jann <ben.jann@gmail.com>

- Prev by Date:
**st: Re: Re: Monte Carlo Simulation for Heteroskedastic Tobit Model** - Next by Date:
**Re: st: Re: A couple of file command questions for writing a .tex program** - Previous by thread:
**Re: st: A couple of file command questions for writing a .tex program** - Next by thread:
**st: loop over variables using arch** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |