亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? teximage_c.m

?? 在matlab中
?? M
?? 第 1 頁 / 共 2 頁
字號:
function out=teximage_c(s,varargin)
%TEXIMAGE display a LaTeX string as a bitmap image
%  H = TEXIMAGE(S) creates an image of the LaTeX string S and
%   displays it in the current figure. Click and drag to
%   move the image and use the context menu to change properties.
%   The image handle is returned in H, if specified. If S is a cell
%   array of strings then each is made into a separate image and
%   the resulting handles are returned as a vector. S can also be a
%   symbolic expression (see SYM).
%
%  H = TEXIMAGE(S,PARAM1,VALUE1,PARAM2,VALUE2,...) creates the image
%   with options given by the parameter-value pairs. The argument S
%   can be a string or the image handle H returned by a previous
%   call to TEXIMAGE or a cell array of strings or vector of handles.
%   The legal parameter strings and values are:
%
%    'antialias'        one of the strings 'on' or 'off'
%      antialiasing will produce more readable text on-screen
%      but will sacrifice printout quality (default on)
%
%    'convolution'      an integer
%      the size of the convolution matrix for antialiasing (default 7)
%      smaller numbers will result in sharper text
%
%    'background'       a colorspec
%      specifies the background color (default white) 
%      background color 'none' means no background (requires OpenGL renderer)
%
%    'scale'            a double
%      multiplies the image size by specified scale (default 1)
%
%    'resolution'       a double
%      the font resolution to use (default 600)
%
%    'displaymode'      one of the strings 'math', 'text' or 'none'
%      specifies the TeX display mode to use (default 'math')
%      The 'none' displaymode will put the string S directly into
%      the TeX file without any surrounding $ or $$.
%
%    'rotation'         a multiple of 90
%      rotates the image counterclockwise in degrees (default 0)
%
%    'position'         a 2 element vector 
%      specifies the position of the center of the bitmap on the
%      figure (default [.5 .5])
%
%    'units'            an HG units string ('normalized','inches',...)
%      specifies the units for the position property (default 'normalized')
%
%    'parent'           a figure handle
%      specifies the figure to use (default current figure)
%
%  When the input S is a handle a new TeX string can be specified
%  with the parameter 'texstring'. To get the current parameter
%  value for a given handle call GETAPPDATA with the handle and
%  the name of the parameter. eg,
%    scale = getappdata(h,'scale');
%
%  The default parameter values can be set in R12(or later) by calling 
%  SETPREF. eg, 
%    setpref('teximage','resolution',300);
%    setpref('teximage','background',get(0,'DefaultFigureColor'));
%  and in R11 by modifying STARTUP.M to call setappdata as follows:
%    setappdata(0,'teximage',struct(...
%      'resolution',300,'background',get(0,'DefaultFigureColor'));
%
%  H = TEXIMAGE('-noHG',S,PARAM1,VALUE1,...) generates the bitmap
%  but does not create an HG image object. The bitmap is return in
%  H as a height x width x 3 matrix of doubles.
%
%  Important note: LaTeX must be installed before running this
%  function. To obtain a LaTeX distribution see your system 
%  administrator or go to the web site http://www.tug.org
%  This function was tested with MikTeX on PCs and Web2c7.2 on Unix.
%
%  Examples:
%   h = teximage('\dot{x} = \sqrt{x+1}','scale',2);
%   teximage(h,'antialias','off');
%   h2 = teximage('\lim_{n \rightarrow \infty} \left(1+\frac{1}{n}\right)^n')
%   h3 = teximage('Math $x^2+1$ inline.','displaymode','none');
%
%  See also: TEXT, SYM, LATEX

%  Version 1.1. Copyright 2002 Ben Hinkle
%  Email bug reports and comments to bhinkle@mathworks.com
%  MikTeX+CJK版,由哈工大土木學院王剛博士修改

%TODO: 
%  better text with transparent backgrounds - need darken/lighten?
%  support arbitrary rotation angles
%  support user-specified tex file template
%  better support on old TeX versions and old MATLAB versions
%  test more PC distributions and add them to the registry query

if isunix
  exe_ext = '';
else
  exe_ext = '.exe';
end
noHG = logical(0);

% first handle the callbacks
if isa(s,'char')
  switch(lower(s))
   case {'startmove','mousemove','endmove','figuremoved'}
    feval(lower(s),varargin{:});
    return;
   case '-nohg'
    noHG = logical(1);
    s = varargin{1};
    varargin(1) = [];
    % note no return
   case '-setup'
    texbin = locateTeX;
    if isequal(texbin,0)
      texbin = promptForTeX(exe_ext);
      if isequal(texbin,0)
	error(['No TeX installed. See www.tug.org for' ...
	       'a list of distributions.']);
      end
    end
    if ~isempty(texbin)
      Lsetpref('teximage','texpath',texbin);
    end
    return;
   case {'increasesize','decreasesize','whitecolor','transparent',...
	'figurecolor','togglealias','sharpentex','blurtex',...
	'rotclockwise','rotcounterclock'}
    docallback(s,varargin{:});
    return;
  end
end

% handle vectorized inputs
if isa(s,'cell') | (ishandle(s) & length(s) > 1)
  iscell = isa(s,'cell');
  y = zeros(1,length(s));
  for n=1:length(s)
    if iscell
      y(n) = teximage(s{n},varargin{:});
    else
      y(n) = teximage(s(n),varargin{:});
    end
  end
  if nargout > 0
    out = y;
  end
  return;
elseif isa(s,'sym') % handle symbolic expressions
  s = latex(s);
end

% get the default values for the options
ishndl = ishandle(s);
antialias =   getdefault(ishndl,s,'antialias','on');
convolution = getdefault(ishndl,s,'convolution',7);
resolution =  getdefault(ishndl,s,'resolution',600);
background =  getdefault(ishndl,s,'background',[1 1 1]);
scale =       getdefault(ishndl,s,'scale',1);
displaymode = getdefault(ishndl,s,'displaymode','math');
rotation =    getdefault(ishndl,s,'rotation',0);
position =    getdefault(ishndl,s,'position',[.5 .5]);
units =       getdefault(ishndl,s,'units','normalized');
parent =      getdefault(ishndl,s,'parent','gcf');
if ishndl
  oldHandle = s;
  s = getappdata(s,'texstring');
end

%process param-value pairs
while length(varargin) > 0
  if isa(varargin{1},'char') & (length(varargin) > 1)
    switch lower(varargin{1})
     case 'antialias'
      antialias = lower(varargin{2});
     case 'convolution'
      convolution = varargin{2};
     case 'resolution'
      resolution = varargin{2};
     case 'background'
      background = varargin{2};
     case 'scale'
      scale = varargin{2};
     case 'displaymode'
      displaymode = lower(varargin{2});
     case 'rotation'
      rotation = varargin{2};
     case 'texstring'
      s = varargin{2};
     case 'position'
      position = varargin{2};
     case 'units'
      units = lower(varargin{2});
     case 'parent'
      parent = varargin{2};
     otherwise
      error(['Unrecognized parameter:' varargin{1} '.']);
    end
  end
  varargin(1:2) = [];
end

if convolution < 1
  convolution = 1;
end
rotation90 = round(rotation/90);

if ishndl & canreusebits(oldHandle,resolution,displaymode,s)
  bits = getappdata(oldHandle,'texbitmap');
else
  olddir = pwd;
  file = tempname;
  cd(tempdir);
  try
    tex(file,s,displaymode,exe_ext);
    dvips(file,resolution,exe_ext);
    bits = ghostscript(file,resolution,exe_ext);
  catch
    delete([file '*']);
    cd(olddir);
    error(deblank(lasterr));
  end
  delete([file '*']);
  cd(olddir);
end
y = makeimage(bits,background,antialias,convolution,rotation90);
if noHG
  out = y;
  return;
end

% make an image in the current figure and set up callbacks
if isa(parent,'char')
  parent = eval(parent);
end
fig = parent;
fpos = convertUnits(get(fig,'units'),get(fig,'position'),'inches');
center = convertUnits(units,[position 10 10],'inches',fpos,'inches');

ys = [size(y,2) size(y,1)] * scale / resolution;
if ishndl
  h = oldHandle;
  ax = get(h,'parent');
  set(ax,'position',[center(1)-ys(1)*.5 center(2)-ys(2)*.5 ys(1) ...
		     ys(2)]);
  set(h,'cdata',y);
  try
    if isequal(background,'none')
      set(h,'alphadata',1-y(:,:,1));
      if ~isequal(get(fig,'renderer'),'opengl')
	set(fig,'renderer','opengl');
      end
    else
      set(h,'alphadata',1);
    end
  end
  set(ax,'xlim',[1 size(y,2)],'ylim',[1 size(y,1)]);
else
  ax = axes('parent',fig,'visible','off',...
	    'handlevis','off','units','inch','tag','teximage_axes');
  set(ax,'position',[center(1)-ys(1)*.5 center(2)-ys(2)*.5 ys(1) ...
		     ys(2)]);
  h = image('cdata',y,'parent',ax,'tag','teximage');
  try
    if isequal(background,'none')
      set(h,'alphadata',1-y(:,:,1));
      if ~isequal(get(fig,'renderer'),'opengl')
	set(fig,'renderer','opengl');
      end
    else
      set(h,'alphadata',1);
    end
  end
  set(ax,'xlim',[1 size(y,2)],'ylim',[1 size(y,1)],...
	 'xtick',[],'ytick',[],'ydir','reverse');
  set(h,'uicontextmenu',makecontextmenu(h));
  set(h,'buttondownfcn','teximage(''startmove'',gcbo)');
  oldResize = get(fig,'resizefcn');
  newResize = 'teximage(''figuremoved'',gcbo);';
  if ~isempty(oldResize) & ~isequal(oldResize,newResize)
    warning('Overwriting existing ResizeFcn property of figure.');
  end
  set(fig,'resizefcn',newResize);
end
setappdata(h,'resolution',resolution);
setappdata(h,'antialias',antialias);
setappdata(h,'convolution',convolution);
setappdata(h,'background',background);
setappdata(h,'scale',scale);
setappdata(h,'displaymode',displaymode);
setappdata(h,'texstring',s);
setappdata(h,'texbitmap',bits);
setappdata(h,'rotation',rotation);
setappdata(h,'position',position);
setappdata(h,'units',units);
setappdata(h,'parent',parent);
setantialiasmenu(h,antialias);
if nargout > 0
  out = h;
end

function tex(file,s,displaymode,exe_ext)
tex_file = [file '.tex'];
tex_fid = fopen (tex_file, 'w');
if (tex_fid < 0)
    error('Unable to create temporary file')
end

% write out the TeX file
fprintf(tex_fid, '%%&latex\n'); % this tells the TeX to use latex.fmt
fprintf(tex_fid, '\\documentclass{minimal}\n');
fprintf(tex_fid, '\\usepackage{CJK}\n'); %added to use CJK
fprintf(tex_fid, '\\begin{document}\n');
fprintf(tex_fid, '\\begin{CJK*}{GBK}{song}\n');  %暫時用宋體 %added to use CJK

if isequal(displaymode,'math')
  fprintf(tex_fid, '$$');
  fprintf(tex_fid,'%s \n',s); %changed here
  fprintf(tex_fid, '$$ \n');
elseif isequal(displaymode,'text')
  fprintf(tex_fid, '$');
  fprintf(tex_fid,'%s \n',s);
  fprintf(tex_fid, '$ \n');
else
  fprintf(tex_fid,'%s \n',s); 
  fprintf(tex_fid, '\n');
end
fprintf(tex_fid, '\\end{CJK*}\n'); %added to use CJK
fprintf(tex_fid, '\\end{document}\n');
fclose(tex_fid);


%now run TeX
if Lispref('teximage','texpath')
  texbin = Lgetpref('teximage','texpath');
else
  texbin = locateTeX;
  if isequal(texbin,0)
    error(['Cannot automatically locate TeX installation. ' ...
	   'Run ''teximage -setup'' to manually locate TeX. ']);
  end
  if ~isempty(texbin)
    Lsetpref('teximage','texpath',texbin);
  end
end
[s,r] = run_system_cmd(['echo X | "' fullfile(texbin,['tex' exe_ext]) ...
                    '" "' tex_file '"']);
if ~exist([file '.dvi'])
  ind1 = findstr('!',r);
  if ~isempty(ind1)
    ind2 = findstr(sprintf('\n'),r(ind1+1:end));
    r = r(ind1-1:ind1+ind2(3)-1);
  end
  error(['Error running TeX: ' r]);
end

function dvips(file,res,exe_ext)
dvi_file = [file '.dvi'];
ps_file = [file '.ps'];
if Lispref('teximage','texpath')
  texbin = Lgetpref('teximage','texpath');
else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss鲁片一区二区三区在线看| 免费成人av在线| 色偷偷88欧美精品久久久| 亚洲欧洲精品成人久久奇米网| 99精品黄色片免费大全| 亚洲日本在线a| 欧美福利一区二区| 国产在线精品一区二区三区不卡| 久久品道一品道久久精品| 不卡的av网站| 性做久久久久久久久| 日韩精品资源二区在线| 国产成人午夜电影网| 一区二区三区在线观看视频| 制服.丝袜.亚洲.另类.中文 | 国产精品久久精品日日| 91豆麻精品91久久久久久| 首页国产欧美日韩丝袜| 2021国产精品久久精品| 99久久99久久精品免费看蜜桃| 一区二区三区**美女毛片| 欧美一区二区三区成人| 成人免费高清视频在线观看| 亚洲精品水蜜桃| 欧美电视剧在线观看完整版| 不卡的电影网站| 蜜臀av在线播放一区二区三区| 欧美韩国日本不卡| 欧美日韩国产综合一区二区三区| 精品一区二区三区久久| 亚洲精品国产第一综合99久久 | 久久99久久久欧美国产| 亚洲视频一区二区在线| 欧美sm极限捆绑bd| 91视频观看免费| 狠狠色狠狠色综合| 一区二区三区免费在线观看| 欧美成人精品福利| 在线观看亚洲专区| 高清不卡在线观看| 男人的天堂亚洲一区| 最好看的中文字幕久久| 欧美tickle裸体挠脚心vk| 欧美色窝79yyyycom| 丁香激情综合五月| 蜜桃视频免费观看一区| 亚洲一区二区三区四区的| 国产午夜一区二区三区| 日韩精品在线网站| 欧美剧在线免费观看网站| 99国产一区二区三精品乱码| 国产一区二区按摩在线观看| 日韩国产一二三区| 亚洲一区二区五区| 亚洲私人影院在线观看| 欧美国产成人精品| 久久欧美中文字幕| 欧美sm美女调教| 日韩一二三区不卡| 欧美男同性恋视频网站| 欧美性生活影院| 在线观看不卡一区| 在线精品视频免费播放| 在线精品视频免费播放| 色偷偷一区二区三区| av网站免费线看精品| 不卡视频在线观看| 国产91精品露脸国语对白| 国产综合色精品一区二区三区| 蜜桃传媒麻豆第一区在线观看| 天天综合色天天| 日韩精品欧美精品| 日韩av网站免费在线| 日本美女一区二区三区视频| 亚洲午夜精品在线| 亚洲成人一二三| 午夜精品久久久久久久99樱桃| 亚洲激情图片小说视频| 亚洲欧美日韩久久精品| 亚洲最大成人网4388xx| 尤物在线观看一区| 亚洲成人三级小说| 日韩和欧美一区二区| 日韩精彩视频在线观看| 日韩av午夜在线观看| 美女www一区二区| 麻豆freexxxx性91精品| 国产一区二区三区免费观看| 国产精品18久久久久久久久久久久 | 精品一区中文字幕| 国产成人h网站| 色哟哟亚洲精品| 欧美性受xxxx黑人xyx| 91精品国产综合久久香蕉的特点| 欧美一区二区免费视频| 国产日韩欧美激情| 国产精品国产a级| 一区二区日韩电影| 热久久久久久久| 国产在线精品一区二区三区不卡| 成人综合婷婷国产精品久久 | 亚洲国产一区二区三区 | 伊人色综合久久天天人手人婷| 有码一区二区三区| 免费看黄色91| 成人av先锋影音| 欧美视频精品在线| 欧美一区二区观看视频| 久久精品网站免费观看| 夜色激情一区二区| 麻豆一区二区三区| 91色在线porny| 欧美一区二区观看视频| 中文字幕av一区 二区| 亚洲在线一区二区三区| 国产一区二区中文字幕| av电影在线观看完整版一区二区 | 欧美二区乱c少妇| 国产亚洲一二三区| 亚洲国产aⅴ天堂久久| 国产呦萝稀缺另类资源| 色狠狠色狠狠综合| 久久亚洲私人国产精品va媚药| 亚洲免费av在线| 麻豆一区二区在线| 在线视频你懂得一区| 国产午夜亚洲精品午夜鲁丝片| 亚洲伦在线观看| 激情文学综合网| 欧美三级中文字| 日本一区二区久久| 久久av资源网| 欧美日韩免费视频| 18欧美亚洲精品| 在线视频你懂得一区二区三区| 精品av久久707| 亚洲成人动漫一区| 99热99精品| 国产亚洲一本大道中文在线| 日韩黄色在线观看| 91国产成人在线| 欧美激情在线观看视频免费| 免费观看一级特黄欧美大片| 一本高清dvd不卡在线观看| 欧美激情一区二区在线| 韩国一区二区在线观看| 欧美日韩高清不卡| 一区二区三区四区精品在线视频| 国产成人无遮挡在线视频| 日韩精品一区二区三区视频播放 | 国产乱子伦视频一区二区三区 | 亚洲成人免费av| 色婷婷av一区| 亚洲品质自拍视频| 成熟亚洲日本毛茸茸凸凹| 日韩一区二区不卡| 亚洲综合丁香婷婷六月香| 91免费国产在线观看| 国产精品每日更新在线播放网址| 久久se精品一区二区| 欧美tk丨vk视频| 国产在线播放一区| 欧美tickling挠脚心丨vk| 免费黄网站欧美| 欧美va亚洲va在线观看蝴蝶网| 免费精品视频在线| 欧美电影精品一区二区| 九色综合狠狠综合久久| 91精品国产日韩91久久久久久| 肉肉av福利一精品导航| 欧美巨大另类极品videosbest| 亚洲国产精品一区二区www| 欧美熟乱第一页| 亚洲一卡二卡三卡四卡五卡| 91免费看`日韩一区二区| 亚洲精品中文在线| 欧美日韩中字一区| 亚洲国产一区二区a毛片| 欧美日韩激情一区二区三区| 蜜臂av日日欢夜夜爽一区| 精品国产乱码久久久久久夜甘婷婷| 美女mm1313爽爽久久久蜜臀| 久久久综合视频| av男人天堂一区| 亚洲一二三区不卡| 91精品国产aⅴ一区二区| 激情亚洲综合在线| 国产嫩草影院久久久久| aaa亚洲精品| 亚洲一区二区视频| 欧美一区二区三区系列电影| 国内精品在线播放| 国产精品国产a| 欧美视频一区二区| 秋霞电影一区二区| 久久久久久一二三区| 91久久精品一区二区三| 青青草原综合久久大伊人精品优势 | 国产高清在线观看免费不卡| 国产精品乱码妇女bbbb|