Discussion:
lyx-code - date-insert
David Wolfson
2005-10-13 16:37:04 UTC
Permalink
hello lyx-list,

I've just subscribed having had a trawl through the wiki (but not found the
answer to my problem), so a quick intro seems in order. I'm currently trying
to write up and engineering thesis in lyx, having migrated to linux for all
but a few apps in the last couple of years. Having not had any trainning
pre-se, I'm into ugly scripting hacks and a big fan of mailing lists (the
local lug in nottingham is *very* active and really helpful).

So far I seem to have got my various chapter documents interacting sensbily
and a have been really impressed with the look of the documents (they're just
laking text and that's my problem!). However, the more reading round I do and
the closer to having to sort out final layout, the more I fear I'm going to
have to start using ERT and the like, so I might be after some hint and tips
to get going in the next couple of months...

Anyway, the first of these problems is with inserting a date. I do the
occasion print out and would like to include the current date when I do . I
found some of the lyx-codes described in the wiki, and by adding
'date-insert' and formating as lyxCode I get the current date nicely in the
page :-) However I then get a page with nothing but 'date-insert' after it!

Have I gone about this the right way? If so, how do I get rid of the actual
lyx-code text?

I'm using Version 1.3.5 on madrake 10.1 community...

Thanks in advance for any help/advice,

Dave
c***@public.gmane.org
2005-10-13 17:50:03 UTC
Permalink
Post by David Wolfson
Anyway, the first of these problems is with inserting a date. I do the
occasion print out and would like to include the current date when I do.
Hang on... you actually want to have the current date in the printout???
(One of the most frequent questions is how to *not* get the date:-)

It's been a while, but I think you'll need an ERT that contains
\today{}
LaTeX will automaticall replace '\today{}' with the time the document is
compiled. You can place this command in headers/footers if you want it on
every page.

cheers
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
David Wolfson
2005-10-14 07:20:43 UTC
Permalink
Cheers for the reply Christian,
Post by c***@public.gmane.org
Post by David Wolfson
Anyway, the first of these problems is with inserting a date. I do the
occasion print out and would like to include the current date when I do.
Hang on... you actually want to have the current date in the printout???
(One of the most frequent questions is how to *not* get the date:-)
My first response was 'really! the date gets put in anyway?' Then I tried the
ERT you suggested and suddenly I get two dates... For now that's perfect, but
I have a horrible feeling I'll be trawling the archives to find out how to
get rid of it soon!

Thanks for guidance on my first foray into ERT,

Dave
Charles de Miramon
2005-10-14 10:57:09 UTC
Permalink
Post by David Wolfson
My first response was 'really! the date gets put in anyway?' Then I tried
the ERT you suggested and suddenly I get two dates... For now that's
perfect, but I have a horrible feeling I'll be trawling the archives to
find out how to get rid of it soon!
Thanks for guidance on my first foray into ERT,
On top of your document you can put that in ERT

\pagestyle{myheadings}
\markright{\jobname, le \today{}}

The first line tell latex that you want homemade headings.
The second line creates a header on each right page

and choose headings in Format->documents

That will print in the header, the name of your file and the date

Buying a introductory book for LaTeX is a good investment, especially if you
have deadlines.

Cheers,
Charles
--
http://www.kde-france.org
Rich Shepard
2005-10-14 13:03:41 UTC
Permalink
Post by David Wolfson
My first response was 'really! the date gets put in anyway?' Then I tried
the ERT you suggested and suddenly I get two dates... For now that's
perfect, but I have a horrible feeling I'll be trawling the archives to
find out how to get rid of it soon!
Dave,

The date is inserted by default. If you do not want a date on the title
page (book, article, report), then insert:

\date{}

in the document's preamble.

I have that as the default for all document classes. On the rare occasion I
want TeX to insert the date, I remove it.

BTW, if you're becoming addicted to LyX and LaTeX buy a copy of "The LaTeX
Companion, 2nd Edition." It's a fascinating book to read and answers so many
questions. Very highly recommended.

Rich
--
Dr. Richard B. Shepard, President | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Loading...