f



Writing contents of an external file to another external file?

Hi,

I'm currently working with the ledmac package that I've modified
somewhat to meet my needs. Ledmac is used to create critical endnotes
and (in somewhat simplified terms) it writes the endnote info into an
external file (called \jobname.end) and when a \doendnotes{X} command
is called, it closes that file and places an \input{\jobname.end} into
the root document. I have created also another file (called
\jobname.eaa) in which similar sort or endnote info is written.

The problem is that I would like to periodically, first, write _the
contents_ of \jobname.eaa into \jobname.end (and then empty .eaa to
receive more info, which works ok): essentially to have a command that
periodically "dumps" the contents of .eaa file to the .end file. Ho
could I do this? I have tried many things and searched this group, as
well as a few (La)TeX books but, alas, to no avail.

I can of course simply make the package to periodically write
"\include{\jobname.eaa}" into the .end file, but this is not
desirable, since I don't want the entire, final .eaa file written to
those places, just the contents the .eaa file has _accumulated until_
I  give the command to write itself into .end.

I have been thinking about a TeXnique to somehow save, or create
placeholder tokens for the endnote info that now goes into the .eaa
file and then just periodically collate and \immediate\write those
tokens to the .end file, but I'm not at all sure how to do this.

Thank you for any answers or comments.

0
10/16/2007 7:06:56 PM
comp.text.tex 39029 articles. 3 followers. Post Follow

2 Replies
852 Views

Similar Articles

[PageSpeed] 57

Sorry to continue on my own post, but one option would be to establish
a \newcounter to append a number to the name of the \jobname.eaa files
and then write "\input{\jobname[counter value].eaa}" to the .end file.

In the project that I use the package with, with this mechanism would
eventually be probably well over a hundred of such .eaa files. Will
this be a problem? Furthermore how could I make the \counter _number_
to appear in the filename? Would a simple \the suffice?

Again, sorry, and thank you for any insights!


0
10/16/2007 7:15:39 PM
ludvikengelbrekt@yahoo.co.uk wrote:

> The problem is that I would like to periodically, first, write _the
> contents_ of \jobname.eaa into \jobname.end (and then empty .eaa to
> receive more info, which works ok): essentially to have a command that
> periodically "dumps" the contents of .eaa file to the .end file. Ho
> could I do this? I have tried many things and searched this group, as
> well as a few (La)TeX books but, alas, to no avail.

Have a look at the \verbatimcopy-macro of the
verbatimcopy-package maintained by Lars Madsen:
http://www.ctan.org/tex-archive/macros/latex/contrib/verbatimcopy/

You may wish to write to a register other than \verbatim@out
while opening and closing this write-handle outside the 
\verbatimcopy-macro.

Ulrich


0
eu_angelion1 (617)
10/17/2007 12:57:30 AM
Reply:

Similar Artilces:

hyperref to external file -- how to display external file name
I am using the hyperref and hyper-xr packages to create hyperlinks to labels in external files. (I am compiling the .tex files with pdflatex). E.g., inside a file named test7.tex, I have: \Chapter{test7 chapter} \label{ch:test} Then, in the preamble of a file named test8.tex \externaldocument[7-]{test7} and in the file's body: Now go to \autoref{7-ch:test}, \Nameref{7-ch:test} Assuming both files are compiled correctly, the code above will produce Now go to chapter 1, "test7 chapter", on page 1 in test8.pdf and this will link to the appropriate place in test7.pdf. However, even though the links go to the correct external file, the text produced by \autoref and \Nameref doesn't list the name of the file itself. I would like to have this for human readability -- e.g., something like: Now go to chapter 1, "test7 chapter", on page 1 of file test7 where "of file test7" is generated automatically by a command similar to \autoref and \Nameref. However, I could not find such a command or any other ways to do this. Any pointers will be greatly appreciated. lstyle wrote: > I am using the hyperref and hyper-xr packages to create hyperlinks to > labels in external files. (I am compiling the .tex files with > pdflatex). > > E.g., inside a file named test7.tex, I have: > > \Chapter{test7 chapter} > \label{ch:test} > > Then, in the preamble of a file named test8.tex > > \externaldocument[7-]{test7} > &g...

how to call external .js file from another .js file
hi, usually if we call external js file by declaring them in our html page head section: <head> .. .. .. <script language="JavaScript" src="j1.js"></script> <script language="JavaScript" src="j1_ext.js"></script> </head> my question is...is it possible to declare j1_ext.js from j1.js? eliminating j1_ext.js from <head ..> section declaration. <head> .. .. .. <script language="JavaScript" src="j1.js"></script> </head> tnx On Sep 5, 1:56 pm, shotokan99 <soft_devj...

write file + input file + write file
Hi, I want to write some latex command to a file (file1), input the file at the end of the document. These command shall write to another file (file2) and at a second run I use the file2. Whatever I have tried nothing works and I don't known why. The goal is to save a set of special commands and run them at the end of the document, because they use some values which are only available at the end! Can anybody please help me with that? Thanks in advance! I should be something like: \begin{document} \usepackage{style} \input{file2} %file exists from a previous run \end{document} style.sty: \newwrite\fileone \openout\fileone=file1.out \newwrite\filetwo \openout\filetwo=file2.out \newcommand{\writetofiletwo}[1]{% \write\filetwo{#1}% } \newcommand{\writetofileone}[1]{% \write\fileone{\writetofiletwo{some text}}% } \AtEndDocument{\closeout\fileone% \input{file1}% \closeout\filetwo% } Problem solved :-) \immediate\closeout before \input was required. greenux wrote: > Hi, > I want to write some latex command to a file (file1), input the file > at the end of the document. These command shall write to another file > (file2) and at a second run I use the file2. > Whatever I have tried nothing works and I don't known why. The goal is > to save a set of special commands and run them at the end of the > document, because they use some values which are only available at the > end! > Can anybody please help me with that? > Thanks in advance! &...

write into existing file with &quot;write to text file&quot;
Hi all,&nbsp;I have a text file that contains several lines of data (text). Now I would like to replace the first three lines with text coming from a string array.My approach is shown in WriteToFile.vi that is attached.When I am executing this vi (with an empty file), everything seems to be working fine in the first place.The file will contain the following text:oneoneonetwotwotwothreethreethreeNow, when the third element in the array is shortened (lets say to "threethr") before execution,&nbsp; the file will contain&nbsp; the following text:(the file was not emptied befo...

How to validate a xml file by an external dtd file?
Hi, I use xerces to parse a xml file, but I don't know how to validate the xml file with an external dtd file, anyone can help me? or whether there are some other methods to do this? Thanks yw <pest9998@hotmail.com> wrote: > Hi, > I use xerces to parse a xml file, but I don't know how to validate > the xml file with an external dtd file, anyone can help me? <!DOCTYPE root SYSTEM "path/to/external/subset"> with "root" being your root element. -- David H�s�ther Thanks for your answer, I am a novice at XML, can your explain the method mo...

write binary in text file to excel file
Hi all, I have a few questions regarding writing binary in text file to excel file. 1. How do I specify so that there will 8bits in one cell? 2. When the front bits are zeros, the zeros will not be showed. Eg. 00110101 will be shown as 110101. How to make it take the zeros into account? Thanks alot. Best regards, Jess Try to use cell array of srings such as "00101". Then put this cell array in xlswrite function. ------------------------------------ Maxim Vedenev, Matlab freelancer vedenev@ngs.ru http://simulations.narod.ru/ ...

reading file list, writing to text file
Hi. I'm relatively new to matlab and would like to read all the jpg in a directory (for later manipulation) and create a text file with a list of all the files read (with directory path). Currently i have: d=dir('*.jpg'); for k=1:length(d) fname=d(k).name; fname %check it is reading all files fid=fopen('list.txt', 'w'); count = fprintf(fid, fname); fclose(fid) end The problem I have is that even though the program correctly reads through all the files, only the last read file is stored in the text file....I presume the text file is just constantly being...

scanning text file and writing from .txt file
Hi, I have this data in a txt file: time = 0.0000E+00 mat.#= 1012 inten= 0.0000E+00 kinen= 0.0000E+00 eroded_ie= 0.0000E+00 eroded_ke= 0.0000E+00 x-mom= 0.0000E+00 y-mom= 0.0000E+00 z-mom= 0.0000E+00 x-rbv= 0.0000E+00 y-rbv= 0.0000E+00 z-rbv= 0.0000E+00 mat.#= 1013 inten= 0.0000E+00 kinen= 0.0000E+00 eroded_ie= 0.0000E+00 eroded_ke= 0.0000E+00 x-mom= 0.0000E+00 y-mom= 0.0000E+00 z-mom= 0.0000E+00 x-rbv= 0.0000E+00 y-rbv= 0.0000E+00 z-rbv= 0.0000E+00 mat.#= 1...

Executable JAR files and writing to a text file.
I have an application in which it writes to a text file at a specific direc= tory location. I run the program and it runs fine! Now I create an executa= ble JAR file. Should the jar file work fine if the program needs to write = to a text file in ../resources/HighScore.txt? Thanks again Doug On 02/12/2015 12:40 PM, Doug Mika wrote: > I have an application in which it writes to a text file at > a specific directory location. > I run the program and it runs fine! Now I create an executable JAR file. > Should the jar file work fine if the program needs to write to a &g...

table of contents and external files
Hi all, How can I manually add to \tableofcontents entries from external files? For example, if I am making a latex file that is only 10 pages, and someone is producing a paper with MS Word form pages 11 to 20 consisting of several sections, and we want the table of contents to include entries from both file, how can I manually make it add to the list the section Foo on page 13 for example? I've looked at \addcontentsline{toc}{section}{section-name} but I can't figure out how to make it work for external files and let me manually give a page number. Thanks rsina wrote: > H...

[Lighttpd] Writing to an external file?
Hello There's not much activity in the Lighttpd forum, so I figured maybe some people here use this web server instead of Apache, and would know the cause of the problem. PHP scripts can successfully read/write to an SQLite file when it's located either in Lighttpd's web directory (/usr/local/www/data/) or in /tmp, but it fails writing when the file is located elsewhere (such as /var). I've checked file and directory ownership and access rights, as well as /usr/local/etc/lighttpd.conf and Lighttpd's error log, to no avail. I don't know where else to look for an expl...

insert text from one file into another (multiple files)
Hi, Using GNU Bash, version 3.00.16(11)-release (i686-pc-cygwin) on Windows XP I have a group of files in a directory. (my working group). I also have a group of files in another directory, with corresponding filenames. (my add_in group) For each file in my working group: I would like to insert immediately after a specific line, the entire text contained in the file from my add_in group. How can I accomplish this? Thanks Jeff Higgins 2006-01-16, 10:26(-06), Jeff Higgins: [...] > Using GNU Bash, version 3.00.16(11)-release (i686-pc-cygwin) > on Windows XP > > I have a group...

appending the contents of multiple text files into 1 file
Hi, is there a simpler/more idiomatic way to append/join the contents of multiple text files into 1 file? this works, but i'm trying to see if there are more succinct methods. thanks! mynewfile =3D File.new('C:\mynewfile.txt', 'w') @myfilenames.each do |mfn| File.open('#{mfn}.txt') do |file| file.each_line {|line| mynewfile.puts(line)} end =20 end mynewfile.close Alle gioved=EC 14 giugno 2007, Paul Danese ha scritto: > Hi, > > is there a simpler/more idiomatic way to append/join the contents of > multiple text files into 1 file? &...

Making external file with the same length as the original SAS file
Hi, I wanted to make an external file. I tried to use the following code. data mydata; set jan.survey12; file 'file1.txt' ; put SURVEYID '|' COUNTY '|' ORG_NAME '|' PHONE '|' ADDRESS '|' CITY '|' STATE '|' ZIP '|' FAX '|' URL '|' RSPNDNT '|' R_PHONE '|' R_TTY '|' R_EMAIL '|' P_NM_TTL '|' Q1B1 '|' Q1B2 '|' Q1B3 '|' Q1B4 '|' there are alot more variables. My problem is that the record length of the newly created file (fil...

How to find New File,Write file and close file?
Hi Anyone can show me how to find New File,Write File and close file in block diagram.The picture of file names are as show in pics. Thanks &nbsp; Nyan Lin File find.JPG: http://forums.ni.com/attachments/ni/170/322096/1/File find.JPG Hi. The functions You're looking for are under "File I/O --&gt; Advanced File Functions" (At least the NEW File) The 2 others are in the "File I/O" menu on the functions palette. Good luck.Message Edited by BCL@Servodan on 05-08-2008 03:38 AM Hi again. My mistake. I was looking in my LabView7. In 8.5.1 the Icons have changed.....

Including *.bib file content in a single tex file
Hello pals I am submitting a paper and need to change the original style that I wrote for my thesis into a journal style. I am wondering how to get rid of bib file and put everything into a tex file? The thing is that I have a mybib.bib file in the folder and I reference it using \bibliography{mybib} and I need to remove this line and include all the content into the file. Any suggestions? Thanks in advance! Alvyn Alvyn wrote: > Hello pals > > I am submitting a paper and need to change the original style that I > wrote for my thesis into a journal style. I am wondering how...

read text file through Labview and then write to an excel file
Hello, &nbsp; I am relatively new with using Labview. I was wondering what would be a general method of reading data from a text file (words, sentences, numbers, and etc.) and making Labview write it on an Excel file. &nbsp; Thanks Ivan ...

Is there a system option for OpenVMS SAS version 8 where a sas program can create an output file with a file attribute of "Stream_LF" so that these external files can b
To SAS-Lers (specifically OpenVMS Users), Is there a system option for OpenVMS SAS version 8 where a sas program can create an output file with a file attribute of "Stream_LF" so that these external files can be served through an Apache WebServer properly? Currently, what happens is when we create a CSV file, the Apache Webserver wants to load the contents of this CSV file into a single cell for Excel. That is, all OBS are treated as a SINGLE record and all the contents is loaded into a single cell within Excel. To fix this problem, we are able to use an "Convert/FDL" th...

Re: Is there a system option for OpenVMS SAS version 8where a sas program can create an output file with a file attribute of "Stream_LF" so that these external files ca
We don't have SAS/Intrnet on OpenVMS, so that problem didn't come up here, but I had a similar problem with creating files I wanted to ZIP later - a text file in the standard OpenVMS format can't be ZIPped, transferred to Windows, UNZIPped, and read there (not easily, anyway). The file needed to be in stream format before it was ZIPped. My workaround was to create an empty stream-format file and append to it; SAS is smart enough to figure out that the appended data need to be in stream format also. -- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Departm...

Re: Is there a system option for OpenVMS SAS version 8 where a sas program can create an output file with a file attribute of "Stream_LF" so that these external files c
Charles Patridge <charles_s_patridge@PRODIGY.NET> wrote: > Is there a system option for OpenVMS SAS version 8 where a sas program can > create an output file with a file attribute of "Stream_LF" so that these > external files can be served through an Apache WebServer properly? > > Currently, what happens is when we create a CSV file, the Apache Webserver > wants to load the contents of this CSV file into a single cell for Excel. > That is, all OBS are treated as a SINGLE record and all the contents is > loaded into a single cell within Excel. > > T...

Modify external file will cause External Table empty
Hi all, I have a strange problem. I have a csv file that is used as source file in External Table (ET). When I try to modify the file, and select ET will caused no rows returned. But when I delete one of the column in CSV file, the ET works ok. If I create new CSV file from notepad, it cause ET was empty too. The ET only works, if CSV file generated from my Excel Macro. Any idea what happen actually? Thanks, Resant Resant wrote: > Hi all, > I have a strange problem. I have a csv file that is used as source file > in External Table (ET). > When I try to modify the file, and sele...

awk script to split text file content to multiple files
I have an input text file like this. ------------------------ DEFINE QLOCAL ('Q1') + ... number of lines ... REPLACE DEFINE QLOCAL ('Q2') + ... number of lines ... REPLACE DEFINE QALIAS ('A1') + ... number of lines ... REPLACE DEFINE QALIAS ('A2') + ... number of lines ... REPLACE ------------------------ The input file contains other definitions as well, such as QREMOTE, LISTENER, etc. But I use the above for the sake of simplicity. I want to sp...

Calling external text-files (newb)
Hi I tried to have python call an external 'Word'-file, and the read the whole text into a single string with the following code: [CODE] source = raw_input('file path') File = open('source', 'r') S = input.read() print S [/CODE] But when I try to run it, it raises the following error: File = open('sorce', 'r') IOError: [Errno 2] No such file or directory: 'sorce' Is it something I am mimssing, or does python require a special form of path? Thanks in advance Fred\\ ___________________________________________________________...

Writing the contents of Tk::Text to a file
I want to write the contents of a Tk::Text to a file. I have _Learning Perl_, which suggets print FH $t->get('1.0', 'end'); (where FH is a file handle open for writing and $t is the Text widget in question). This works, except that it adds an extra blank line to the output. I think something like this should work: print FH $t->get('1.0', ($numLines + 1) . '0'); but I can't figure out how to get the number of lines in the Text widget. Help? TIA! On Tue, 19 Apr 2005 02:54:33 GMT, "register_allocation" <r...

Web resources about - Writing contents of an external file to another external file? - comp.text.tex

Help:Contents - Wikipedia, the free encyclopedia
Templates are special pages that contain boilerplate text intended to be displayed on more than one page in Wikipedia. This Tip of the day box ...

Portal:Contents/Society and social sciences - Wikipedia, the free encyclopedia
A society is a group of people who form a semi-closed system . At its simplest, the term society refers to a large group of people sharing their ...

Seven and Google sign content deal
Seven West Media has signed a deal to have its content from shows such as My Kitchen Rules and Home and Away streamed on Google's online video ...

SuperPhone and Apple's Future Content Strategy, Best Buy Is Betting on iPhone 7
... sales tool called SuperPhone . Upon closer examination, the ideas underpinning SuperPhone match what I suspect is Apple's long-term content ...

L'Oreal Creates Unbranded Content Hub to Woo Beauty Fans
In a world that's all about return on investment, why would a major marketer invest in a global content hub that carries no branding and no e-commerce ...

How Mobile Content Brings Customers Through Your Doors
... there to influence buying decisions, the more likely customers are to choose your store over your competitor. Sherry Gray is a freelance content ...

India To Appeal WTO Verdict On Domestic Solar Content Usage, Again
... of India’s National Solar Mission did not conform to international trade laws. [&hellip India To Appeal WTO Verdict On Domestic Solar Content ...

Ovation Brands Is Already Selling The Contents Of Buffets Closed On Sunday
... and proprietary items,” the auction notice says. Some things might have been carried off to other buffets, but the starting bid for the contents ...

Post ‘Spotlight’ Oscar And ‘The Revenant’, Anonymous Content Explores Minority Stake Sale
... Picture Oscar win for Spotlight , Best Picture nomination for The Revenant and Golden Globe win for Mr. Robot , Steve Golin ’s Anonymous Content ...

Five Ways CMOs Are Failing At Content
... Roman, president of Ernan Roman Direct Marketing and an expert on customer-experience innovation. Recently, AOL CMO Allie Kline said that content ...

Resources last updated: 3/11/2016 8:16:59 AM