Comments (8)
But this is l3draw, so surely it is in 3D?? :-)
from latex3.
See comments in the sources: the are deliberately not includes pending solid use cases. I suspect that 'local' auxiliaries are likey the base plan.
from latex3.
latex3/l3experimental/l3draw/l3draw-points.dtx
Lines 67 to 78 in 2ea12ef
from latex3.
% \item \cs{pgfextractx}, \cs{pgfextracty}: Available by applying % \cs{use_i:nn}/\cs{use_ii:nn} or similar to the \texttt{e}-type % expansion of a point expression.
But public \draw_point_...
functions expand points to points themselves, aka two-element comma-separated lists. Only the internal \__draw_point_process:nn
expands a point to {<x-coord>}{<y-coord>}
, which then can be passed to \use_i:nn
/\use_ii:nn
to extract x/y-coordinate.
That's why @jasperhabicht uses \clist_item:en
in the demonstration in #1488 (comment).
from latex3.
@muzimuzhi Yes, my code comment is inaccurate but the general idea stands. In pgf
you need the 'extract' commands as the information is internal. In l3draw
we can do everything using an fp expression by expansion, so can easily create an 'extract the value' command. But more widely, there are two things. First, as we can use tuples throughout, I'm not sure point extraction is very useful - we don't need to access just-x or just-y. Second, as this is really a general tuple feature, I suspect it should be handled within l3fp
, something like \fp_eval:n { select(2, (<tuple>) }
-> y-value.
from latex3.
(Whole reason this code is in l3experimental
is of course that this sort of stuff needs exploring.)
from latex3.
BTW, points don't have a z-co-ordinate ;)
from latex3.
I think there can be situations where you need just the x or the y part of a point coordinate, for example if you want to calculate trigonometric stuff where you can't always use tuples (for example when using atand()
, you need both values separately *). Or you might want to use the y part of one point coordinate and the x part of another to create a new point coordinate.
I agree that extracting a value from a tuple should rather be a feature of l3fp
. However, currently there is no such a feature and it would most probably be based on a loop. So, in the end there are still arguments against and in favor of implementing this in l3draw
directly.
*) See https://tex.stackexchange.com/a/711906/47927 for a use case. I think with only tuples, it would be difficult to calculate the angle, but I might be wrong.
from latex3.
Related Issues (20)
- tabularray broken with latest release of l3kernel HOT 7
- Property list 'implicit behavior changed', perhaps a better error message needed. (edited) HOT 14
- Undefined control sequence \__tl_peek_analysis_normal:N HOT 6
- Non-declared variable is not created when `check-declarations` is on HOT 9
- Feature / Documentation request: V and v argument specifiers also for Property Lists HOT 9
- c variants of the l3fparray module HOT 1
- `l3opacity`: `\opacity_stroke:n` and `\opactiy_fill:n` not working and/or leading to broken PDF HOT 10
- Only `\opacity_select:n` fails silently without pdfmanagement HOT 1
- Status of `./l3packages/l3doc` directory HOT 1
- quotes in integer module documentation HOT 2
- l3doc conflict with `ProvidesExplFile` HOT 8
- `l3draw`: transformations (rotation/shift) not added up correctly HOT 1
- `\draw_path_rectangle:nn` doesn't apply shifting HOT 1
- `\draw_point:n` not documented HOT 5
- `\draw_path_grid:n` draws lines outside of grid rectangle
- l3draw: rectangle + corner arc setting + rectangle give wired output
- `l3fp`: Add function to extract items from a tuple
- New function `\fp_if_eq:NN(TF)`
- `l3draw`: robustify `\draw_path_corner_arc:nn`
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 latex3.