<div dir="ltr"><div>If there're robust date classes / packagees, it shouldn't matter which / where and they all ought to synch up.</div><div><br></div><div>Agree, if one can have a single point of control, that's potentially better, but it's often easier to use a native tool in a given operation than reaching outside of it, grabbing some external value and then continuing.</div><div><br></div><div>William</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 1, 2017 at 10:10 AM, Mike Marchywka <span dir="ltr"><<a href="mailto:marchywka@hotmail.com" target="_blank">marchywka@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
I'm still curious about the tex scripting options but would just point out that when apps have to<br>
talk to each other, it may be better to generate things like file names in one location and then share<br>
them. Which leads me to my next comment that instead of learning all the app specific text processing<br>
tools, you have sed and awk etc available for every application. You can write bash scripts to<br>
generate shared variables and then have R or tex find them or even write bash scripts<br>
that generate R and tex code. So far I've had good luck with this approach and used<br>
variants for a java based server that needed to make use of R for some ( slow  ) queries.<br>
<br>
You have no idea when you may have to add time zones or even go to millisecond times<br>
for example with dates. Changing this once is a lot easier than hunting down all the clients.<br>
<br>
Thoughts?<br>
<br>
______________________________<wbr>__________<br>
From: texhax <<a href="mailto:texhax-bounces@tug.org">texhax-bounces@tug.org</a>> on behalf of William Adams <<a href="mailto:will.adams@frycomm.com">will.adams@frycomm.com</a>><br>
Sent: Wednesday, February 1, 2017 8:19 AM<br>
To: Christopher W Ryan<br>
Cc: TeXHaX List<br>
Subject: Re: [texhax] include a pdf graphics file whose name includes a varying date<br>
<span><br>
While David's solution (of course) works, I'm pretty sure that if you consult the documentation for the package datenumber there will be an option to enable padding with a leading zero (though it's odd to me that apparently this is turned one for days? Or have you never had to do a report during the first nine days of a month?)<br>
<br>
William<br>
<br>
</span><span>On Tue, Jan 31, 2017 at 5:39 PM, David Carlisle <<a href="mailto:d.p.carlisle@gmail.com">d.p.carlisle@gmail.com</a><<wbr>mailto:<a href="mailto:d.p.carlisle@gmail.com">d.p.carlisle@gmail.com</a>><wbr>> wrote:<br>
\ifnum\thedatemonth<10 0\fi\thedatemonth<br>
<br>
David<br>
<br>
</span><div><div class="h5">On 31 January 2017 at 22:33, Christopher W Ryan <<a href="mailto:cryan@binghamton.edu">cryan@binghamton.edu</a><mailto:<a href="mailto:cryan@binghamton.edu">c<wbr>ryan@binghamton.edu</a>>> wrote:<br>
> I'm resurrecting a thread from back in October (month 10--two digits--this<br>
> is of consequence).  My challenge was this:<br>
><br>
> I am using R and Sweave and MikTeX on Windows 7.  I use this workflow<br>
> to generate a recurring report quarterly. Same report, just new data.<br>
><br>
> The R code generates a graph, saving it as a pdf file, the filename<br>
> including the system date., like this:<br>
><br>
> <timeseriesplot, results=hide, echo=FALSE>>=<br>
> # make the major graph<br>
> pdf(file=paste("<br>
> NaloxoneUseEMS-timeseriesplot-<wbr>", Sys.Date(), ".pdf",<br>
> sep=""), height=8, width=12)<br>
> ## bunch of R code in here to create a graph<br>
> dev.off()<br>
> @<br>
><br>
><br>
>   Each time I run the report, the name of the saved pdf file changes, to<br>
> match the system date. I want to include the<br>
> most current graph in my pdf output.<br>
><br>
> William Adams kindly provided this excellent solution:<br>
><br>
> \documentclass{article}<br>
><br>
> \usepackage{datenumber}<br>
><br>
> \begin{document}<br>
><br>
> NaloxoneUseEMS-timeseriesplot-<wbr>\thedateyear-\thedatemonth-\<wbr>thedateday<br>
><br>
> \end{document}<br>
><br>
><br>
> Which worked very well for a while.  But now that it is January (month 1, or<br>
> 01, and there is the crux of the problem) it no longer does.  Here is part<br>
> of the latex error message that provides a clue:<br>
><br>
><br>
> ERROR: LaTeX Error: File `ERROR: LaTeX Error: File `ERROR: LaTeX Error: File<br>
> `NaloxoneUseEMS-<wbr>timeseriesplot-2017-1-31' not found.<br>
><br>
><br>
> So it appears that the Latex package datenumber is searching for the<br>
> graphics file called<br>
><br>
><br>
> NaloxoneUseEMS-timeseriesplot-<wbr>2017-1-31.pdf (which of course does not exist)<br>
><br>
><br>
><br>
> whereas my R code is creating the graphics file called<br>
><br>
><br>
> NaloxoneUseEMS-timeseriesplot-<wbr>2017-01-31.pdf (which was successfully created<br>
> and is sitting in the proper directory.)<br>
><br>
><br>
> Can I make datenumber use 2 digits for \thedatemonth?<br>
><br>
><br>
> Thanks.<br>
><br>
><br>
> --Chris Ryan<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div>> On Fri, Oct 14, 2016 at 3:15 PM, Christopher W Ryan <<a href="mailto:cryan@binghamton.edu">cryan@binghamton.edu</a><mailto:<a href="mailto:cryan@binghamton.edu">c<wbr>ryan@binghamton.edu</a>>><br>
<span>> wrote:<br>
>><br>
>> William--<br>
>><br>
>> Fantastic! Thanks!<br>
>><br>
>> --Chris<br>
>><br>
</span>>> On Fri, Oct 14, 2016 at 2:43 PM, William Adams <<a href="mailto:will.adams@frycomm.com">will.adams@frycomm.com</a><<wbr>mailto:<a href="mailto:will.adams@frycomm.com">will.adams@frycomm.com</a>><wbr>><br>
<span>>> wrote:<br>
>> > \documentclass{article}<br>
>> ><br>
>> > \usepackage{datenumber}<br>
>> ><br>
>> > \begin{document}<br>
>> ><br>
>> > NaloxoneUseEMS-timeseriesplot-<wbr>\thedateyear-\thedatemonth-\<wbr>thedateday<br>
>> ><br>
>> > \end{document}<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> TeX FAQ: <a href="http://www.tex.ac.uk/faq" target="_blank" rel="noreferrer">http://www.tex.ac.uk/faq</a><br>
> Mailing list archives: <a href="http://tug.org/pipermail/texhax/" target="_blank" rel="noreferrer">http://tug.org/pipermail/<wbr>texhax/</a><br>
> More links: <a href="http://tug.org/begin.html" target="_blank" rel="noreferrer">http://tug.org/begin.html</a><br>
><br>
> Automated subscription management: <a href="http://tug.org/mailman/listinfo/texhax" target="_blank" rel="noreferrer">http://tug.org/mailman/<wbr>listinfo/texhax</a><br>
</span>> Human mailing list managers: <a href="mailto:postmaster@tug.org">postmaster@tug.org</a><mailto:<a href="mailto:postmaster@tug.org">post<wbr>master@tug.org</a>><br>
<br>
</blockquote></div><br></div>