ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Getting the filename which is being typeset
@ 2020-12-01 13:45 Otared Kavian
  2020-12-01 14:25 ` Tomas Hala
  0 siblings, 1 reply; 11+ messages in thread
From: Otared Kavian @ 2020-12-01 13:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi everyone,

I have to typeset a few files which get each an input file named in a certain way. For instance, a file named « myfile.tex » in which another file named « myfile-buffer.tex » is used as an \input file, as in

% content of myfile.tex
%%%%%
\starttext
This is a test.

\input myfile-buffer.tex
\stoptext
%%%%%

 When typesetting « myfile.tex » I wonder whether it is possible to get the name of the file without its suffix, that is to get « myfile », with a command such as
\getNameOfCurrentFile
and then be able to replace the above snippet by:

% desired content of myfile.tex
 %%%%%
\starttext
This is a test.

\input \getNameOfCurrentFile-buffer.tex
\stoptext
%%%%%

Best regards and thanks for any hint: Otared K.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-12-05  8:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 13:45 Getting the filename which is being typeset Otared Kavian
2020-12-01 14:25 ` Tomas Hala
2020-12-01 15:20   ` Otared Kavian
2020-12-01 16:33     ` Henning Hraban Ramm
2020-12-01 17:10       ` Otared Kavian
2020-12-01 17:23         ` Wolfgang Schuster
2020-12-01 17:55           ` Otared Kavian
2020-12-01 18:47             ` Hans Hagen
2020-12-04  7:02           ` Axel Kielhorn
2020-12-04  9:04             ` Hans Hagen
2020-12-05  8:38               ` Axel Kielhorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).