Re: OT: Macro for day and time in metapost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sent from ProtonMail, encrypted email based in Switzerland.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, September 19, 2019 6:01 AM, Tim via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

> On Thu, 2019-09-19 at 03:01 +0000, None via users wrote:
>
> > We can see
> > %%Creator: MetaPost
> > %%CreationDate: 2019.09.07:0852
> > But can we see it the document itself when viewed by gv? Or by
> > okular/evince?
>
> Try opening it those program, and see what it shows you in their file
> properties.
>
> ------------------------------------------------------------------------------------
>
> uname -rsvp
> Linux 3.10.0-1062.1.1.el7.x86_64 #1 SMP Fri Sep 13 22:55:44 UTC 2019 x86_64
>
> Boilerplate: All unexpected mail to my mailbox is automatically deleted.
> I will only get to see the messages that are posted to the mailing list.

Using the LaTeX Previewer one can see how the date and time appear when one typesets the document, for instance visit page

http://www.tlhiv.org/ltxpreview/

Copy + Paste following code
<code>
% Calculate the number of hours and number of minutes (24 hour format):
\newcount\inthour
\newcount\inthoursixty
\newcount\intminute
\inthour=\time
\divide\inthour60
\intminute=\time
\inthoursixty=\inthour
\multiply\inthoursixty60
\advance\intminute-\inthoursixty

% Text representations of hours and minutes (24 hour format):
\def\zmonth{\ifnum\month<10\relax0\fi\number\month}
\def\zday{\ifnum\day<10\relax0\fi\number\day}
\def\zhour{\ifnum\inthour<10\relax0\fi\number\inthour}
\def\zminute{\ifnum\intminute<10\relax0\fi\number\intminute}

%\number\year-\zmonth-\zday\space\zhour:\zminute

\[
\overline{x} = \frac{1}{n}\sum_{i=1}^{n} x_{i}
\]
\texttt{This document was typeset at:
\number\year.\zmonth.\zday:\zhour\zminute}

</code>

A formula appears and this document was typeset at: 20190920:0806

I would like to see/know if something like this can be done with a metapost document.  I hope to clear some doubts if there were some.

Best Regards,


Antonio
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux