Comments (1)
You can set matplotlib to use pgf as backend for pdf files using a hidden chunk in the start of the document if you want. I will look into adding it as optional format as well. It looks like the currently used "agg" backend doesn't support unicode so in order to get full support one would need to set pgf as backend.
<<echo=False>>=
import matplotlib
from matplotlib.backends.backend_pgf import FigureCanvasPgf
matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf)
from matplotlib.externals import six
import matplotlib as mpl
pgf_with_custom_preamble = {
"font.family": "serif", # use serif/main font for text elements
"text.usetex": True, # use inline math for ticks
"pgf.rcfonts": False, # don't setup fonts from rc parameters
"pgf.preamble": [
"\\usepackage{units}", # load additional packages
"\\usepackage{metalogo}",
"\\usepackage{unicode-math}", # unicode math setup
r"\setmathfont{xits-math.otf}",
r"\setmainfont{DejaVu Serif}", # serif font via preamble
]
}
mpl.rcParams.update(pgf_with_custom_preamble)
@
from pweave.
Related Issues (20)
- Remove `Published using Pweave` Notice HOT 1
- File Failed to Load MathJax HOT 1
- Broken since python3.8 upgrade HOT 3
- pweave using `results='tex'` in chunk headers creates empty lines in the tex file
- Feature request: include code from chunks with 'source' option in ptangle output
- chunk option `f_spines` documented but does not seem to be implemented
- Is there anyway to change the table format as in fig width
- Not compatible with `jupyter_client>=6` HOT 9
- `<%= %>` and `<% %>` have the same functionality
- figformat removes in >0.3?
- md to pdf using pweave HOT 1
- Any changes to handling of tikz diagrams?
- figure numbers in pandoc
- Is the project still active? HOT 6
- publish can easily support markdown format
- Can chunk option values be expressions?
- customizing fonts, code font size/syntax coloring, document color, etc.
- Not compatible with jupyter-client >= 7.0.0 HOT 6
- Syntax warning from __init__.py: assert file != "" is not None
- WeaveTest.testFIR_FilterExampleTex failing
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 pweave.