tex

LaTeX renderer for .NET?

牧云@^-^@ 提交于 2019-12-03 16:14:22
问题 I'm curious as to whether a native .NET renderer for TeX/LaTeX exists. The closest match I have been able to find is a Java implementation, JMathTeX. I am tempted to port this to C#, but before I do so, I would simply like to check whether anyone is aware of a .NET implementation out there. My current thoughts are to use MiKTeX along with dvipng to compile the TeX source and render the generated DVI as a PNG, but I'm still worrying this may incur an unacceptable amount of overhead, not to

Add in the LaTeX TOC an included PDF

强颜欢笑 提交于 2019-12-03 12:21:35
问题 In my document I include a PDF using \includepdf[pages=-]{./mypdf.pdf} The problem I'm having is how to add a TOC entry for this pdf. It supposed to be an appendix. I tried adding a new section in the appendix but of course the section name can't be printed on the same page than the included pdf, so the resulting TOC line directs to a wrong page. If I use \addcontentsline I loose the numbering and the page is wrong too because the included pdf actually starts at the next page... I'm a bit

C++ having trouble returning sf::Texture

匿名 (未验证) 提交于 2019-12-03 10:10:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to store all my textures in an array. but the images aren't getting returned it would seem here's my code I was under the assumption that my loadTex and loadSpri functions would return and store their data in the array that i made, but it doesn't seem to be working that way because when i run the game they don't show up, just white space. My code probably looks bad, but i'm quite the beginner still and trying to get the hang of things Here's render.cpp #include "render.h" texandsprite render::textures[5]; sf::Texture loadTex(std:

Passing Metal texture2d_array to SceneKit shader modifier

匿名 (未验证) 提交于 2019-12-03 08:57:35
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create shader modifier for SCNMaterial (with SCNShaderModifierEntryPointSurface ) and pass Metal texture2d_array as custom input. To achieve that I try to use key-value coding setting parameter of type SCNMaterialProperty . From SceneKit manual on SCNMaterialProperty property contents : You can set a value for this property using any of the following types: ... A texture (SKTexture, MDLTexture, MTLTexture , or GLKTextureInfo) ... So, I construct MTLTexture : Create MTLTextureDescriptor with type MTLTextureType2DArray Create

Multi-textured Point Sprites in OpenGL ES2.0 on iOS?

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to make a multi-textured point sprite for an iphone application using OpenGL ES 2.0. I can't find any examples of this on web, and it doesn't seem to be working. Is there some built-in limitation where gl_PointCoord can't be used on multiple textures when using GL_POINTS mode for point sprites? uniform sampler2D tex ; uniform sampler2D blur_tex ; vec4 texPixel = texture2D ( tex , gl_PointCoord ); vec4 blurPixel = texture2D ( blur_tex , gl_PointCoord ); I'm sure I am passing in the textures properly, as I can do multi

Associate .Rnw with vim latex suite

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This I am sure is really basic stuff. I am just beginning using gvim and latex-suite. However I would like latex-suite to load when I edit a sweavefile with.Rnw extension. my .vimrc looks like this " These settings are needed for latex-suite filetype indent on filetype plugin on filetype on let g:tex_flavor='latex' set grepprg=grep\ -nH\ $* "let g:Tex_Folding=0 "I don't like folding. set iskeyword+=: and I guess there is some option I can set here that makes vim treat Rnw as .tex? 回答1: Put a file in /usr/share/vim/vimfiles/ftdetect (for

How to put a newline into a column header in an xtable in R

放肆的年华 提交于 2019-12-03 03:54:44
问题 I have a dataframe that I am putting into a sweave document using xtable, however one of my column names is quite long, and I would like to break it over two lines to save space calqc_table<-structure(list(RUNID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), ANALYTEINDEX = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), ID = structure(1:11, .Label = c("Cal A", "Cal B", "Cal C", "Cal D", "Cal E", "Cal F", "Cal G", "Cal H", "Cal High", "Cal Low", "Cal Mid"), class = "factor"), mean_conc = c

rmarkdown: pandoc: pdflatex not found

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I use the render{rmarkdown} to produce pdf file from .Rmd file on my Mac, an error message says pandoc: pdflatex not found. pdflatex is needed for pdf output. Error: pandoc document conversion failed However when I check with pdflatex -v I got pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012) kpathsea version 6.1.0 Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more

GLSL sampler2D in struct

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In GLSL there seems to be linking error of shaders when I try to pass a uniform struct with a sampler2D attribute to a function which is forward declared. The code works if I remove forward declaration and move the function above main. Is this illegal code? #version 330 core in vec2 texcoords; out vec4 color; struct Material{ sampler2D tex; // Sampler inside a struct }; uniform Material material; // Forward Declaration vec4 add(Material m); void main() { color = add(material); } // Function Definition vec4 add(Material m) { return vec4

TeX in matplotlib on Mac OS X and TeX Live

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have the following Hello World code to try out TeX rendering with matplotlib on my Mac. import matplotlib . pyplot as plt from matplotlib import rc rc ( 'text' , usetex = True ) rc ( 'font' , family = 'serif' ) plt . text ( 2 , 2 , r "Hello World!" ) plt . show () With that code, I'd get the following error: sh : latex : command not found Exception in Tkinter callback <... a long Traceback here ...> RuntimeError : LaTeX was not able to process the following string : 'lp' Here is the full report generated by LaTeX : I don't see