LaTeX forum ⇒ Generaldatetime2 showdow Topic is solved

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

datetime2 showdow  Topic is solved

Postby Pangur » Fri Sep 27, 2019 5:48 pm

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

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

Postby rais » Sat Sep 28, 2019 4:47 pm

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

Postby Pangur » Sat Sep 28, 2019 6:04 pm

\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: 258
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sat Sep 28, 2019 7:29 pm

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

Postby Pangur » Sun Sep 29, 2019 1:57 am

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: 233
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Sun Sep 29, 2019 10:58 am

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}.

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

Postby Pangur » Sun Sep 29, 2019 2:44 pm

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.


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests