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]

Re: st: Deleting hlines (or midrules) in -tabout- .tex files


From   "Eric A. Booth" <[email protected]>
To   [email protected]
Subject   Re: st: Deleting hlines (or midrules) in -tabout- .tex files
Date   Thu, 5 Sep 2013 10:02:52 -0500

<>

Not sure how to do it within -tabout-.  The 'bt' option seems to add
them all automatically. One thing I tend to do to post-process these
-tabout- produced LaTeX files is to use -filefilter- to remove extra
code, e.g.,

filefilter "`pdir'/output/`dofile'.tex" "`pdir'/output/`dofile'.tex",
from( "\midrule" ) to(" ") replace

in your loop after the -tabout- command in order to remove '\midrule'
from the tex file you just produced.

- Eric

On Thu, Sep 5, 2013 at 9:54 AM, Roberto Ferrer <[email protected]> wrote:
> Hi,
>
> I'm using -tabout- (from SSC, Version 2.0.6 26nov2012) to make some
> tables in Latex format. The result I'm getting is very close to what I
> want. However, I would like to delete all the midrules (or hlines)
> that appear within. How can this be achieved? I can't  find any option
> that would allow me to do that.
>
> Thank you.
>
> * -------------------- my code ---------------------
>
> tabout yearobs if inlist(yearobs, `yearstex') ///
>     using "`pdir'/output/`dofile'.tex",  ///
>         c(`allmean') sum f(2c)  ///
>             replace style(tex) ptotal(none) bt h1(nil) h2(nil) ///
>                 h3(\multicolumn{8}{c}{Subtitle 1} \\)
>
> tabout yearobs if inlist(yearobs, `yearstex') ///
>     using "`pdir'/output/`dofile'.tex",  ///
>     c(`allmean') sum f(2c)  ///
>     append style(tex) ptotal(none) bt h1(nil) h2(\\) ///
>     h3(\multicolumn{8}{c}{Subtitle 2} \\)
>
> * ------------- result (in .tex file) -----------------
>
> \multicolumn{8}{c}{Subtitle 1} \\
> \midrule *DELETE THIS
> 1990&-3.20&-6.35&-1.92&&-5.58&-7.92&0.00 \\
> 2000&-5.19&-5.29&-5.00&&-5.67&-1.51&-8.14 \\
> \\
> \multicolumn{8}{c}{Subtitle 2} \\
> \midrule *DELETE THIS
> 1990&0.54&28.86&4.61&&-2.25&24.06&33.06 \\
> 2000&16.53&21.10&-2.66&&10.73&17.70&4.64 \\
> *---------------------------------------------------------
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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