LyXTable Challenge

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
stevesb
Posts: 9
Joined: Tue Jan 19, 2010 11:26 pm

Re: Table Challenge

Post by stevesb »

Thanks

Tried both the newer code and the original using WinEdt as the LaTex editor and MikTex 2.7 and both worked fine and except for the last col on the extreme right being cut-off little which I am sure can be sorted that's great.

I now need to see how to make it work in Lyx !!!

I don't think its the csv problem since your file and look exactly the same as above work outside Lyx.

Anyway, thanks very much for all your help.

Regards

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

msfox
Posts: 1
Joined: Tue Nov 23, 2010 3:28 pm

Table Challenge

Post by msfox »

I have the same problem and hope you have a solution.

Lyx create form the lyx-file a tex-file in the temp-directory and from this tex-file a PDF. Now, lyx doesn't copy the CSV-File to the temp-directory. I think, if you (@stevesb) set an absolute path to the csv-File, the your example works fine.

My problem is, I don't can use an absolute path to the csv-file.

1. idea (http://thread.gmane.org/gmane.editors.lyx.general/50417)
I create a Lyx-template for external files. Here my template

Code: Select all

Template CSV
	GuiName "CSV: $$AbsOrRelPathParent$$Basename"
	HelpText
		CSV
	HelpTextEnd
	InputFormat csv
	FileFilter "*.csv"
	AutomaticProduction false
	# LyX has hard-coded support for these transformations
	Preview InstantPreview
	Format CSV
		# This string is what is output to the LaTeX file.
		Product "$$Contents(\"$$AbsOrRelPathMaster$$Basename.csv\")"
		UpdateFormat csv
		UpdateResult "$$AbsPath$$Basename.csv"
	FormatEnd
TemplateEnd
The final result as given by the UpdateResult line. If AutomaticProduction
is false then LyX does not call any converters, only the original file is
copied to the temp dir. Therefore this implies that UpdateResult is the
original file. (http://thread.gmane.org/gmane.editors.lyx.general/50417)
If I open the csv-file as "external document" (Externes Material) in Lyx and write this tex-Code:

Code: Select all

\DTLsetseparator{;}
\DTLloaddb{mydata}{uebung_changelog.csv} 
\begin{tabular}{ccc}  
\DTLdisplaydb{mydata}  
\end{tabular}
The Lyx-Logfile write:
"Package datatool Warning: File `uebung_changelog.csv' has no data on input line 24."
This template doesn't copy the csv-file to the temp-directory. What is wrong?

2. idea
I found of top in the tex-file:

Code: Select all

\def\input@path{{C:/_Data/Projekte/dokumentation_lyx//}}
How I can use this attribute?

Code: Select all

\DTLloaddb{mydata}{\input@path uebung_changelog.csv} 
doesn't work.

Who can help?
Thanks
Post Reply