Comments (10)
This time you can use
<img src="http://localhost:5353/assets/app_icon.png"> <br>
Just use port 5353
instead of 8080
but it's not a permanent fix, I'll handle this in the next update.
from flutter_tex.
from flutter_tex.
I have updated the package please take a look at 3.6.2. I have added a new widget TeXViewImage
where you can load images either from assets or network. Be careful there are some API changes with some new features please do check Changelog and example before proceeding.
from flutter_tex.
The TeXViewImage works like a charme, however I really liked the solution to use
<img src="http://localhost:5353/assets/app_icon.png">
inside the teX string. With the new update that line of code doesn't work anymore.
The advantage for me to use it inside the teX code is that I can use html style functionality.
I want to be able to show code right next to the image.
In html this can be accomplished by something like this:
<div>
<div style:"display: inline-block">
<img src="drawings\fig1.4.1.svg" alt="figure 1.4.1">
</div>
<div style:"display: inline-block">
$$\begin{aligned}
|\mathbf a| &= |\mathbf c|=2, \\[5px]
|\mathbf d| &= |\mathbf f|=3, \\[5px]
|\mathbf b| &= 4
\end{aligned}$$
</div>
</div>
Whats an image src I could use to accomplish this?
Thanks for your help
from flutter_tex.
Put TeXViewImage
in TeXViewContainer
and apply style to your container using TeXViewStyle.fromCSS("your:style;" ), I hope you can achive exactly what you want.
Image src is a source either from a network or local assets.
from flutter_tex.
Yes this worked for me. Thanks for the tip.
If I have a page with lots of images and formula right next to that image I have to split the raw teX-String into lots of smaller pieces and then put them back each in a TexViewContainer file.
Since I have to use some containers inside of each other to achive the layout that I want it becomes very nested.
If I could just use the raw HTML and teX code with something like this:
<img src="http://localhost:5353/assets/app_icon.png"> <br>
it would become a lot easer for me.
However if this solution can't be available anymore I'll stick with the containers.
from flutter_tex.
Ok fine you can get port by using this window.location.port
and just use that port. because this time port is dynamic for each instance, but it won't work properly.
Why don't you create a custom TeXViewWiget and reuse that again and again?
e.g. for you above code
TeXViewWidget customTeXViewWidget(imgSrc, rawTeX) {
return TeXViewColumn(children: [
TeXViewContainer(child: TeXViewImage.asset(imgSrc),
style: TeXViewStyle.fromCSS("display: inline-block")),
TeXViewDocument(
rawTeX, style: TeXViewStyle.fromCSS('display: inline-block'))
]);
}
from flutter_tex.
Hey now again you can use <img src="http://localhost:5353/assets/app_icon.png"> <br>
do get the latest version of flutter_tex.
from flutter_tex.
Thanks, this works!
from flutter_tex.
check this solution
#135 (comment)
from flutter_tex.
Related Issues (20)
- App is crashing HOT 5
- On Running on android phone it got crashes
- Unable to load asset: $key | flutter_tex: ^4.0.3+4 HOT 1
- Load image from device data directory
- math symbols direction in rtl language not correct
- Support math symbols with rtl language
- No support for Html table styles. So table contents get condensed which makes it difficult to read and understand HOT 1
- String from API calls
- The plugin `flutter_tex` uses a deprecated version of the Android embedding
- TeXViewGroup how to clear the selected option or initialise the selected option if the user is revisiting the question HOT 2
- Cannot render HOT 4
- how to create this without use more than one texview
- r""" <h2>(D) \( a_0 = \frac{{\hbar }}{{m_e ke^2 }} \)</h2>"""
- If it is not English, the custom font does not work
- Custom Fonts Do Not Work
- Please update the package to latest version 🙏 HOT 2
- On web, using multiple TeXViews does not work. Only the last will render. HOT 6
- On android,\begin{align} environment does not work HOT 1
- my app getting crashed HOT 2
- Oh bhai mere update krdo is ko Meherbani kro HOT 1
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 flutter_tex.