On 1/19/2024 1:33 AM, Aditya Mahajan wrote:
\starttext
\dorecurse{5000}{\ReadFile{knuth}}
\stoptext
I'll send you the PDFs offlist.
lmtx defaults to 'modern' so you need to
\setupbodyfont[modern]
for mkiv
Hans
% engine=luatex 1.8
> % engine=xetex 2.4
>
> \starttext
>
> \dorecurse{500} {
> \input knuth \par
> }
>
> \stoptext
>
> 125 pages, so how does your test file look
5000 recursions (not 500, sorry about that).
\starttext
\dorecurse{5000}{
it in a calling document as well, for better
management of fonts, etc.
Thus this is most convenient. I have everything in the main document and I can
quickly reuse any figure elsewhere.
What I did:
I use \readfile in a main ConTeXt file document.tex to include the file
included.tex .
The file
of fonts, etc.
Thus this is most convenient. I have everything in the main document and I can
quickly reuse any figure elsewhere.
What I did:
I use \readfile in a main ConTeXt file document.tex to include the file
included.tex .
The file included.tex should contain *just* the TikZ picture
in
.../lmtx/tex/texmf-local/metapost
This seems to work ok here, if not, can you see what the trackers report?
=== oeps.tex ===
\starttext
\usepath[mptest]
% \enabletrackers[resolvers*]
\startMPpage
% readfile(runscript("mp.string(resolvers.find_file('oeps.mp'))")) ;
% readfile
]
\starttext
\startbuffer[test]
print("Output from lua")
\stopbuffer
\savebuffer[list={test}, file={test.lua}, prefix=no]
\ctxlua{job.files.run("test.lua",
"lua test.lua > test-output.tex")}
\ReadFile{test-output.tex}
\savebuffer[list={test
use something like this (untested):
\usemodule[filter]
\defineexternalfilter
[markdown]
[filter={pandoc -t context -o \externalfilteroutput},
output=\externalfilterbasefile.tex,
cache=yes,
directory=output, %make sure a sub-dir output exists
readcommand=\ReadFile]
\startt
on its content. I guess building
blocks are readfile, loops and setting the stop sign (; oder ,).
It already exists:
- Database module
http://wiki.contextgarden.net/M-database
- handlecsv module
https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=55907888/action=view/id=86
As I
uot;Note 3")
> context.stopxcell()
> context.startxcell()
> context("Note 4")
> context.stopxcell()
> context.stopxrow()
> context.stopxtable()
> \stoplua
> \stoptext
Seeing this example I wonder if there is already an
in sumatra for me too. \ReadFile doesn't
work either.
actually that is correct: in context we protect files that are in the
official tex tree as it's generally a bad idea if someone patches these
(there is no distinction here between a style and a sample file); also,
content that originates from
ontains no reference to knuth.tex:
>
> SyncTeX Version:1
> Input:1:G:/Z-Test/test-utf8.tex
> Output:pdf
>
> and synchronization fails in sumatra for me too. \ReadFile doesn't
> work either.
>
> (I made this test with a context updated today).
the f
ynctex output of context is wrong in certain places. E.g.
when I compile this:
\starttext
\input knuth
\stoptext
then the synctex file contains no reference to knuth.tex:
SyncTeX Version:1
Input:1:G:/Z-Test/test-utf8.tex
Output:pdf
and synchronization fails in sumatra for me too. \ReadFile d
t;>
>> % \setupsynctex[state=start,method=min]
>> % \setupsynctex[state=start,method=max]
>> % \enabletrackers[system.synctex.visualize]
>> % \enabletrackers[system.synctex.visualize=real]
>>
>> indeed, we now have a context specific variant only (you ca
> % \setupsynctex[state=start,method=min]
> % \setupsynctex[state=start,method=max]
> % \enabletrackers[system.synctex.visualize]
> % \enabletrackers[system.synctex.visualize=real]
>
> indeed, we now have a context specific variant only (you can still force the
> original synctex b
margin]{}{}
\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground
\stoptext
With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue,
everything’s fine there.
Here are two screenshots:
Desired behavior (Ctx Current): http://d.pr/i/Xgtc
Non-desired behavio
rgin=0mm,
>> rightmargin=45mm,
>> height=fit,
>> width=fit,
>> ]
>>
>> \definetextbackground [test]
>>
>> \starttext
>>
>> \placefigure [margin]{}{}
>>
>> \starttextbackground [test]
>> \dorecurse{3}{\readfile{ward}{}{}}
>
for the entire height of the margin picture.
Here is a minimal:
\setuplayout [
leftmargin=0mm,
rightmargin=45mm,
height=fit,
width=fit,
]
\definetextbackground [test]
\starttext
\placefigure [margin]{}{}
\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground
picture.
Here is a minimal:
\setuplayout [
leftmargin=0mm,
rightmargin=45mm,
height=fit,
width=fit,
]
\definetextbackground [test]
\starttext
\placefigure [margin]{}{}
\starttextbackground [test]
\dorecurse{3}{\readfile{ward}{}{}}
\stoptextbackground
\stoptext
With the ConTeXt Current
:
\enabletrackers [resolvers.readfile]
\starttext
\readfile{file++.ext}{}{}
\stoptext
This reports:
files readfile not found by tree lookup: file .ext
Which means the “++” is replaced by two spaces, instead of searching
for “file++.ext” or “file.ext” which is what I had expected. I
didn't dig
”), but it didn't. So I ran some tracing:
\enabletrackers [resolvers.readfile]
\starttext
\readfile{file++.ext}{}{}
\stoptext
This reports:
files readfile not found by tree lookup: file .ext
Which means the “++” is replaced by two spaces, instead of searching
for “file++.ext
file:
\starttext
\pushcatcodetable
\setcatcodetable\texcatcodes
\usemodule[pstric]
\readfile{pst-add}{}{}
\readfile{pst-spectra}{}{}
\popcatcodetable
\startTEXpage
\hbox\bgroup
\ignorespaces
\pspicture(0,-2.5)(\textwidth,1.6)
\psspectrum[element=H
\component, processfile, readfile etc
instead)
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma
On Thu, 3 May 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
just a quick question - is there a command like \inputif(file)exist(s),
which will \input a file if it exists, i.e. with no error if it doesn't?
\readfile.
From file-res.mkvi
%D \macros
%D {readfile,ReadFile}
%D
%D
Am 03.05.2012 um 17:37 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
Hello,
just a quick question - is there a command like \inputif(file)exist(s),
which will \input a file if it exists, i.e. with no error if it doesn't?
\ReadFile{…}
Wolfgang
, i.e. with no error if it doesn't?
\readfile.
From file-res.mkvi
%D \macros
%D {readfile,ReadFile}
%D
%D One cannot be sure if a file exists. When no file can be
%D found, the \type{\input} primitive gives an error message
%D and switches to interactive mode. The macro \type{\readfile}
%D takes
that are only fixed in
mojca’s repo. (e.g. matrices are still unusable if you don’t do
\unprotect\ReadFile{pgfmodulematrix.code.tex}\protect after loading the
tikz module afaik)
http://tex.stackexchange.com/questions/27952/cmyk-context-colors-in-tikz#27955
that are
only fixed in mojca’s repo. (e.g. matrices are still unusable if you don’t
do \unprotect\ReadFile{pgfmodulematrix.code.tex}\protect after loading the
tikz module afaik)
___
If your question is of interest
@namespace}
)){/home/wagner/Programs/context_beta/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(/home/wagner/Programs/context_beta/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc
/context/base/type-siz.mkiv)
(/usr/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining forced type afm of stmary10 not found
fonts
}
\thedefinedfont \the \ever...
argument ...artreadingfile \startnointerference
\cleanupfeatures \readfile...
\firstofoneargument #1-#1
\dofetchruntimecommand ...\doglobal \setflag {#2
/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv)
(/usr/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map
/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv)
(/usr/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map
are not preloaded
languageslanguage en is active
{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv)
(/usr/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile
/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining forced type afm of stmary10 not found
fontsdefining font with asked
en is active
fontspreloading latin modern fonts (second stage)
filesreadfile asked name: 'loc', not found
fontsdefining forced type afm of stmary10 not found
fontsdefining font with asked name 'stmary10' is not
found using lookup 'file'
fonts
/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining forced type afm of stmary10 not found
fontsdefining font
readfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining forced type afm of stmary10 not found
fontsdefining font with asked name 'stmary10' is not
found using lookup 'file'
fonts
/base/type-siz.mkiv)
(/usr/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining forced type afm of stmary10 not found
fonts
/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(/opt/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/opt/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
readfile asked name: 'loc', not found
{/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/lm/lm-
math.map}{/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/
lm/lm-rm.map}
fontsvirtual math unable to resolve name mapsfromchar
fontsfallback
/texmf/tex/texmf-context/tex/context/
base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/lm/lm-
math.map}{/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/
lm/lm-rm.map}
fontsvirtual
/map/pdftex/
context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
(/Users/hraban/Library/texmf/tex/texmf-context/tex/context/base/type-
siz.mkiv) (/Users/hraban/Library/texmf/tex/texmf-context/tex/context/
base/type-otf.mkiv)
filesreadfile asked name
/tex/texmf-context/tex/context/base/type-
siz.mkiv) (/Users/hraban/Library/texmf/tex/texmf-context/tex/context/
base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/lm/lm-
math.map}{/Users/hraban/Library/texmf
/context/mkiv-base.map}
fonts preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(C:/context/tex/te
xmf-context/tex/context/base/type-otf.mkiv)
files readfile asked name: 'loc', not found
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map
/type-siz.mkiv) (C:/context/tex/te
xmf-context/tex/context/base/type-otf.mkiv)
files readfile asked name: 'loc', not found
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts
/map/dvips/lm/lm-rm.map}
fonts virtual math unable to resolve name mapsfromchar
fonts
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(C:/context/tex/te
xmf-context/tex/context/base/type-otf.mkiv)
files readfile asked name: 'loc', not found
{C
modern fonts (second stage)
(/home/joerg/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/home/joerg/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
files readfile asked name: 'loc', not found
{/home/joerg/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/joerg/context/tex
fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv)
(/usr/share/texmf/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining
/tex/context/third/simpleslides/simpleslides-f-default.tex
simpleslides loading default font setup
(/usr/local/share/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (/usr/local/share/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc
options
(20111012_Lucida1.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc
I do not understand while \readfile behaves differently from \input with regard
to TeX-code processing.
I have the following code:
\readfile{metapost-setup} %(file with metapost inclusions)
\starttext
\startMPpage
..
\stopMPpage
\stoptext
Replace the \readfile by:
\input ../../../metapost
Am 29.09.2011 um 20:57 schrieb Meer, H. van der:
I do not understand while \readfile behaves differently from \input with
regard to TeX-code processing.
I have the following code:
\readfile{metapost-setup} %(file with metapost inclusions)
\starttext
\startMPpage
..
\stopMPpage
Finding the file works with \ReadFile{} works. But is generates another problem
because
\input ../../../metapost-setup
and
\ReadFile{metapost-setup}
behave differently! The \input process my \startMPinclusions correctly but the
ReadFile does not, because the following metapost has
Am 29.09.2011 um 21:10 schrieb Meer, H. van der:
Finding the file works with \ReadFile{} works. But is generates another
problem because
\input ../../../metapost-setup
and
\ReadFile{metapost-setup}
behave differently! The \input process my \startMPinclusions correctly
Aditya Mahajan wrote:
\ReadFile introduces a spurious space when reading the file!
(...)
t-vim uses \ReadFile internally and hence inherits the bug.
Is this a long known bug which nobody can solve or is it possible to solve the
problem ?
--
Romain Diss
romain.d...@yahoo.fr
On Wed, 21 Sep 2011, Romain Diss wrote:
Aditya Mahajan wrote:
\ReadFile introduces a spurious space when reading the file!
(...)
t-vim uses \ReadFile internally and hence inherits the bug.
Is this a long known bug which nobody can solve
No, I just noticed this.
or is it possible to solve
On Wed, 21 Sep 2011, Aditya Mahajan wrote:
On Wed, 21 Sep 2011, Romain Diss wrote:
Aditya Mahajan wrote:
\ReadFile introduces a spurious space when reading the file!
(...)
t-vim uses \ReadFile internally and hence inherits the bug.
Is this a long known bug which nobody can solve
No, I
additional space at the
begining of the \inlineX content.
See this minimal example (copy paste from Peter Münster mail):
\usemodule[vim]
\definevimtyping[C][syntax=c]
\starttext
bla \inlineC{void func(void)} bla
\stoptext
\ReadFile introduces a spurious space when reading the file! Here is a
minimal
to work, but using \ is a reasonable shortcut.
Here is a working example:
\usemodule[t-tikz]
\usetikzlibrary{matrix}
\unprotect
\ReadFile{pgfmodulematrix.code.tex}
\protect
\starttext
\tikzstyle{description}=[fill=white,inner sep=2pt]
\starttikzpicture
\matrix(m)[matrix of math nodes,
row
be done by t-tikz). I still cannot get
to work, but using \ is a reasonable shortcut.
Here is a working example:
\usemodule[t-tikz]
\usetikzlibrary{matrix}
\unprotect
\ReadFile{pgfmodulematrix.code.tex}
\protect
A slightly more robust solution is to load the attached module instead of
t
}
fontspreloading latin modern fonts (second stage)
(/Users/Ian/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/Users/Ian/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/Users/Ian/context/tex/texmf/fonts/map
antykwatorunskaregular AntykwaTorunska-Regular.otf
Still context run has in the log:
(/Users/hans/TeX/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/Users/hans/TeX/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
files
, then running context.
Same result:
filesreadfile asked name: 'antykwa', not found
You said: (all needed files are in the standalone distribution). But is it
possible that somehow the relevant files did not reach my computer?
Searching for antykwa gives only these files in the context setup
, let mtxrun reload the database, then running
context. Same result:
filesreadfile asked name: 'antykwa', not found
Just to be sure: delete the complete luatex cache files per hand and retry.
You said: (all needed files are in the standalone distribution). But is it
possible
On 08/26/2011 03:43 PM, Hans van der Meer wrote:
Did this, removed linked, let mtxrun reload the database, then running context.
Same result:
files readfile asked name: 'antykwa', not found
Which is already wrong, afaik. It should *not* be looking for a
typescript file, because
readfile asked name: 'antt', not found
\setupbodyfont expects the name of a typeface.
I saw from your terminal output that your context version is from july and a
while ago you needed \usetypescript to use “Antykwa Torunska”.
\usetypescript[antykwa-torunska]
\setupbodyfont[antykwa]
\starttext
Hi,
On 08/26/2011 04:57 PM, Hans van der Meer wrote:
files readfile asked name: 'loc', not found
files readfile asked name: 'antykwa', not found
solved by Wolfgang :)
But why, isn't it in the distribution?
Because Microsoft is not in the habit of giving stuff away for free
to \setupbodyfont[antt] now produces:
filesreadfile asked name: 'antt', not found
\setupbodyfont expects the name of a typeface.
I saw from your terminal output that your context version is from july and a
while ago you needed \usetypescript to use “Antykwa Torunska
readfile asked name: 'loc', not found
{/home/marcin/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/marcin/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/home/marcin/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontsvirtual math unable
'.
So I did, and what I got for my trouble was the following pdf (OK, so there
was more white space, but this was all the content).
Wolfgang.pdf
There's not much to guide me in the log file ( the only not found was : files
readfile asked name: 'loc', not found), but context
-abr-01.tex)
fontspreloading latin modern fonts (third stage)
(/home/marcin/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/home/marcin/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/home/marcin/context/tex
preloading latin modern fonts (second stage)
(/home/cecil/ConTeXt/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/home/cecil/ConTeXt/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
{/home/cecil/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm
: '../../t-scancsv.mkiv/t-scancsv'
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)
(C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv)
files readfile asked
-siz.mkiv)
(c:/ConTeXt/tex/texmf-context/tex/context/
filesreadfile asked name: 'loc', not found
{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsvirtual math unable to resolve name mapsfromchar
fonts
modern fonts (second stage)
(c:/ConTeXt/tex/texmf-context/tex/context/base/type-siz.mkiv)
(c:/ConTeXt/tex/texmf-context/tex/context/
files readfile asked name: 'loc', not found
{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map
readfile asked name: 'loc', not found
filesreadfile asked name: 'lbr', not found
fontspreloading latin modern fonts (third stage)
{/home/marcin/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/marcin/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/home/marcin/context
/tex/context/base/type-otf.mkiv)
filesreadfile asked name: 'loc', not found
fontspreloading latin modern fonts (math)
{/home/marcin/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/marcin/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/home/marcin/context/tex/texmf
\relax \the \everyafterrea...
l.2 \readfile{t-pocketdiary.tex.prep}{}{}
Looking at the *.tex.prep file it does not appear that there is something wrong
with it. I am also a bit surprised about the error message in the line after
the Runaway argument?. The command is crippled: it should
On Sat, Oct 16, 2010 at 11:09 PM, Aditya Mahajan adit...@umich.edu wrote:
Hi,
In MkII, I can say
\ReadFile{/tmp/filename}
to read a file in /tmp directory. However, in MkIV, that fails because
ReadFile is defined as
\unexpanded\def\ReadFile #1{\doreadfile{any}
{.}{#1}\donothing
On Sun, 17 Oct 2010, luigi scarso wrote:
On Sat, Oct 16, 2010 at 11:09 PM, Aditya Mahajan adit...@umich.edu wrote:
Hi,
In MkII, I can say
\ReadFile{/tmp/filename}
to read a file in /tmp directory. However, in MkIV, that fails because
ReadFile is defined as
\unexpanded\def\ReadFile
On Sun, 17 Oct 2010, Aditya Mahajan wrote:
I am just looking for macro that takes the filename as a (brace delimited)
parameter and typesets it.
Err.. I mean \inputs it.
Aditya
___
If your question is of interest
will be really ugly.
I am just looking for macro that takes the filename as a (brace delimited)
parameter and typesets it. I can define one on my own; but I thought that
\ReadFile is already supposed to do that.
It is straight forward to fix \ReadFile so that absolute paths work:
\unexpanded
Am 17.10.2010 um 19:58 schrieb Aditya Mahajan:
I wanted something that will work consistently in MkII and MkIV. I can do:
\doifmodeelse{\s!mkii}
{\let\ReadFilter\ReadFile}
{\def\ReadFilter#1{\doreadfile{any}\empty{#1}\donothing\donothing}}
but, I wanted to avoid such things
On Sun, 17 Oct 2010, Wolfgang Schuster wrote:
Am 17.10.2010 um 19:58 schrieb Aditya Mahajan:
I wanted something that will work consistently in MkII and MkIV. I can do:
\doifmodeelse{\s!mkii}
{\let\ReadFilter\ReadFile}
{\def\ReadFilter#1{\doreadfile{any}\empty{#1}\donothing\donothing
]
and have all the tmp files created in $TEMP. Having to set this as a
relative path will be really ugly.
I am just looking for macro that takes the filename as a (brace
delimited) parameter and typesets it. I can define one on my own; but
I thought that \ReadFile is already supposed to do
On 17-10-2010 8:54, Aditya Mahajan wrote:
Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv
is a normal mode or a system mode.
IIRC, system modes cannot be reset using \(enable|disable)mode.
there is nothing special about system modes: they just have a * in front
so you
On Sun, 17 Oct 2010, Hans Hagen wrote:
On 17-10-2010 7:58, Aditya Mahajan wrote:
(BTW, why is system mode *mkii not set in MkII?)
because you can do \doifnotmode{mkiv}
:)
Documented on the wiki page on modes.
Aditya
On Sun, 17 Oct 2010, Hans Hagen wrote:
On 17-10-2010 8:54, Aditya Mahajan wrote:
Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv
is a normal mode or a system mode.
IIRC, system modes cannot be reset using \(enable|disable)mode.
there is nothing special about system
On 17-10-2010 11:02, Aditya Mahajan wrote:
On Sun, 17 Oct 2010, Hans Hagen wrote:
On 17-10-2010 8:54, Aditya Mahajan wrote:
Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv
is a normal mode or a system mode.
IIRC, system modes cannot be reset using
Hi,
In MkII, I can say
\ReadFile{/tmp/filename}
to read a file in /tmp directory. However, in MkIV, that fails because
ReadFile is defined as
\unexpanded\def\ReadFile #1{\doreadfile{any} {.}{#1}\donothing\donothing}
so it explicitly searches in the . (current) directory.
Bug
On 6-8-2010 7:51, Martin Althoff wrote:
I know (almost) nothing about Latex. It just seemed to conform to general
context syntax and worked. Ah, well.
\input was always an exception to the rule but in luatex indeed \input
handles {}
\readfile{somename}{}{}
is more context (the second
and deprecated, move
'next' into \setupindenting
\starttext
\input{davis}
\input{...} is LaTeX style, to read files with spaces in ConTeXt you can
use \input ... or \ReadFile{...}
Wolfgang
___
If your question
in
ConTeXt you can use \input ... or \ReadFile{...}
I know (almost) nothing about Latex. It just seemed to conform to general
context syntax and worked. Ah, well.
best, Martin
___
If your question is of interest
. Despite runs of
\usetypescriptfile has changed. Earlier it used to load file.tex, but now
it loads file.mkiv and therefore, none of the typescripts from the
typescript module work. A short-term work around is to add
\ReadFile{type-charissil}
somewhere befoer \setupbodyfont. (you loose all
in the sources.
Unfortunately that did not fix the problem. Despite runs of
\usetypescriptfile has changed. Earlier it used to load file.tex, but now it
loads file.mkiv and therefore, none of the typescripts from the typescript
module work. A short-term work around is to add
\ReadFile{type
\ReadFile{type-charissil}
\setupbodyfont[charissil]
%workaround 2
%\usemodule[simplefonts]
%\setmainfont[Charis Sil]
Saves me copying my fixed and combined mkiv file after every update.
Best,
Martin
___
If your
not found, a tex
file is searched for, so in mkiv the first try is given.mkiv (which
itself could load given.tex) and when not found given.tex
\ReadFile{type-charissil}
this will not load the typescripts in the same way
Hans
!
\unprotect
\def\dousepublications#1%
{\doonlyonce{#1.\f!bibextension}
{\let\@@savedpar\par
\let\par\ignorespaces
\ifhmode\kern\zeropoint\fi
\readfile{#1.\f!bibextension}
{\showmessage\m!publications{4}{#1.\f!bibextension}}
{\showmessage\m!publications{2}{#1.\f
Am 04.12.2009 um 19:32 schrieb Hans Hagen:
\def\dousepublications#1%
{\doonlyonce{#1.\f!bibextension}
{\let\@@savedpar\par
\let\par\ignorespaces
\ifhmode\kern\zeropoint\fi
\readfile{#1.\f!bibextension}
{\showmessage\m!publications{4}{#1.\f!bibextension
Wolfgang Schuster wrote:
Am 04.12.2009 um 19:32 schrieb Hans Hagen:
\def\dousepublications#1%
{\doonlyonce{#1.\f!bibextension}
{\let\@@savedpar\par
\let\par\ignorespaces
\ifhmode\kern\zeropoint\fi
\readfile{#1.\f!bibextension}
{\showmessage\m!publications{4}{#1.\f
1 - 100 of 138 matches
Mail list logo