Generaldatetime2 showdow

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Pangur
Posts: 29
Joined: Thu Jul 19, 2018 4:47 pm

datetime2 showdow

Post by Pangur »

I produce a booklet which has the date of publication on the front, and inside a list of forthcoming dates that are calculated automatically using datatime2 calc using default of showdow=true.

(a) Inside that works well, as the NAME of the day of the week alongside the date is a helpful check that the dates are correct.

(b) However, on the front cover, I would like to show only the date, and not the NAME of the day of the week.

If I have showdow on, (a) works as I wish but (b) does not work (as the day NAME shows up).
If I turn showdow off, (b) works as I wish but (a) throws up an error, and the list of dates becomes a list of variable names.

What I am wondering is if there is a way to make showdow=false on the front page whilst allow the default of showdow=true to apply to the rest of the document?

I am basically looking to see if there is a way of localising the setting of showdow within a specific environment.

Thanks,
Calum

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

datetime2 showdow

Post by rais »

Pangur wrote: What I am wondering is if there is a way to make showdow=false on the front page whilst allow the default of showdow=true to apply to the rest of the document?

I am basically looking to see if there is a way of localising the setting of showdow within a specific environment.
you could try \DTMshowdowfalse at the beginning of the here unspecified `specific' environment.
If that doesn't work out for you, please provide a Infominimal working example such that others can test their ideas to help you along.

KR
Rainer
Pangur
Posts: 29
Joined: Thu Jul 19, 2018 4:47 pm

datetime2 showdow

Post by Pangur »

\DTMshowdowfalse was exactly what I needed, @rais.

What I am wondering is if that information that you supplied is documented somewhere, and I have missed it? Or is it simply something that a person who knows LaTeX well or the datetime2 package well would know instinctively?

Anyway, I am grateful that it worked so pleasantly for me.

Thanks,
Calum
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

datetime2 showdow

Post by rais »

Well, the way I figured, you already read through the datetime2 documentation, so I looked up the source code.
Anyway, you may have overlooked \DTMsetup{showdow=false}, which may do what you want, too.

KR
Rainer
Pangur
Posts: 29
Joined: Thu Jul 19, 2018 4:47 pm

datetime2 showdow

Post by Pangur »

Thanks. I had not noticed \DTMsetup{showdow=false}, but will probably stick with \DTMshowdowfalse, as it is more compact. However, it is good to have an alternative.

Thanks too for the tip about examining the source code as well as reading the documentation.

Calum
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

datetime2 showdow

Post by Ijon Tichy »

Pangur wrote:Thanks. I had not noticed \DTMsetup{showdow=false}, but will probably stick with \DTMshowdowfalse, as it is more compact.
I recommend to use always the documented user interface. \DTMshowdownfalse can be found only in the implementation section of the manual. \DTMsetup{showdow=false} is even shown as example in the description of option nodayofweek. So IMHO you should prefer \DTMsetup{showdow=false}.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Pangur
Posts: 29
Joined: Thu Jul 19, 2018 4:47 pm

datetime2 showdow

Post by Pangur »

Thanks for elucidating your previous comment. I take your point, and my approach is now guided by your advice. Thus, I am opting for the recommended way of doing things. At least I have an alternative to try, should I encounter further problems.
Post Reply