Comments (3)
Actually the point is that the jobname is customized to be the same of the main file...? But looks like the feature is somewhat broken anyway.
Try compiling the following file:
\documentclass{article}
\usepackage{asymptote}
\begin{document}
123
\begin{asy}
label("[\jobname]");
\end{asy}
\end{document}
Expected behavior: the [
and the ]
is visible.
Actual behavior: they're truncated.
Deleting the whole thing might be a reasonable option.
diff --git a/picture.cc b/picture.cc
index 65c72cbc..4ca86284 100644
--- a/picture.cc
+++ b/picture.cc
@@ -381,20 +381,6 @@ void texinit()
} else {
if(!dir.empty())
cmd.push_back("-output-directory="+dir);
- string jobname="texput";
- if(getSetting<bool>("inlineimage") || getSetting<bool>("inlinetex")) {
- string name=stripDir(stripExt((outname())));
- size_t pos=name.rfind("-");
- if(pos < string::npos) {
- name=stripExt(name).substr(0,pos);
- unlink((name+".aux").c_str());
- jobname=name.substr(0,pos);
- cmd.push_back("-jobname="+jobname);
-#ifdef __MSDOS__
- cmd.push_back("NUL"); // For MikTeX
-#endif
- }
- }
cmd.push_back("\\scrollmode");
}
(This way if there happens to be a file named texput.aux
then there's a problem. But we can just set the jobname to some uniquely-named file to avoid problems...?)
from asymptote.
Indeed, the commit message
In inlinetex mode, avoid interference from pre-existing aux file.
answers your question. We don't want to clutter up the working directory with other file prefixes.
Instead of accessing the volatile symbol \jobname, the user should do this to obtain the desired result:
\begin{asy}
label("["+defaultfilename+"]");
\end{asy}
from asymptote.
Instead of accessing the volatile symbol \jobname, the user should do this to obtain the desired result:
I see. In that case my concern (that jobname must be changed in order to make the values in the measure phase be the same as the actual run) was not a problem
We don't want to clutter up the working directory with other file prefixes.
This is actually not a problem. Starting from a.tex
contains
%! TEX program = pdflatex
\documentclass{article}
\usepackage{asymptote}
\begin{document}
123
\begin{asy}
label("45");
\end{asy}
\end{document}
and type latexmk
, the following files are generated, regardless whether the proposed changes are done:
$ ls
a-1.asy a-1.pdf a.aux a.fdb_latexmk a.fls a.log a.pdf a.pre a.tex
In other words, the clean-up appears to be done correctly. So it's not a problem.
Still, it feels like a good idea to randomize the jobname -- just in case there are multiple parallel runs of asy
in the same directory.
An alternative is to specify -output-directory
to be a temporarily-created directory. Then no clutter of current directory, and clean-up is easy.
I think implementing the proposed changes would be a good idea.
from asymptote.
Related Issues (20)
- Feature request: `var oldAsin=asin;` copies the function HOT 2
- Bug: unitsize() does not work to set unitsize of other pictures HOT 2
- Feature suggestion: automatic generation of constructor HOT 1
- Documentation of cputime is in Structure section? HOT 1
- Feature suggestion: shorthand to create a picture HOT 9
- Feature suggestion: Remove `add(picture dest, picture src, pair position)` variant as it's dangerous HOT 4
- Stack traceback on error?
- Suggestion: integrate with Typst? HOT 3
- Suggestion: `envelope` type don't need `above` passed in HOT 1
- Why does the bounding box of a frame containing just a label not just the label's bounding box? HOT 1
- Suggestion: transformations for shading tools? HOT 1
- Feature suggestion: baseline specification for inclusion in LaTeX HOT 1
- Grammar railroad diagram HOT 2
- scale command breaks graph output HOT 2
- Most recent commit breaks my build HOT 5
- configure fails to enable readline if ncurses is built with separate tinfo lib and "--as-needed" linker flag is used HOT 5
- Rendering issues (Maybe only on Mac M1?) HOT 4
- remainder function in the math module HOT 25
- [xasy2asy] fix "SyntaxWarning" with python3.12+ HOT 1
- [xasy] migrate to python-pyqt6 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asymptote.