GeneralHow to input only part of the .tex file?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
yaozhao
Posts: 57
Joined: Sat Oct 27, 2018 10:38 pm

How to input only part of the .tex file?

Post by yaozhao »

Code: Select all

\input{table1}
And my table1.tex file is:
& & & & & \\
& Mean&Standard Error& Mean&Standard Error& t-stats\\
Panel A. Contributions from all contributors& & & & & \\
Addition & 1105.53& 225.67& 538.01& 117.00& 2.89\\
Deletion & 528.96& 167.25& 174.57& 38.21& 2.32\\
Total & 1634.49& 389.77& 712.58& 153.13& 2.6


But I only need:
Panel A. Contributions from all contributors& & & & & \\
Addition & 1105.53& 225.67& 538.01& 117.00& 2.89\\
Deletion & 528.96& 167.25& 174.57& 38.21& 2.32\\
Total & 1634.49& 389.77& 712.58& 153.13& 2.69\\


The reason why I want to keep the original table1.tex is that this table1.tex file is formed from Stata. So if I change something in Stata, I don't need to make a change in LaTeX.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to input only part of the .tex file?

Post by Johannes_B »

Your post is very unclear.
What is your question?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

How to input only part of the .tex file?

Post by Ijon Tichy »

In such a case it would be better to export CSV instead of TeX code and then use something like datatool or pgfplotstable.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply