亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
日本一区二区三区高清不卡| 91影院在线免费观看| 亚洲天堂av老司机| 欧美激情一区二区三区蜜桃视频| 在线成人免费观看| 欧美在线999| 色狠狠一区二区三区香蕉| 99久久综合精品| 成人动漫一区二区三区| aaa欧美色吧激情视频| 国产mv日韩mv欧美| av电影天堂一区二区在线观看| 国产91精品露脸国语对白| 国产成人综合精品三级| 国产精品系列在线播放| 成人黄色777网| av网站免费线看精品| 欧美午夜精品一区二区三区| 欧美三级电影在线看| 91精品国产综合久久久久久久| 欧美一区二区视频在线观看 | 久久精品免费观看| 日韩精品免费专区| 韩国三级电影一区二区| 成人永久看片免费视频天堂| 色婷婷综合久久久久中文一区二区| 欧美性猛交xxxx黑人交| 欧美午夜理伦三级在线观看| 欧美乱熟臀69xxxxxx| 精品成人在线观看| 国产精品入口麻豆原神| 午夜久久久影院| 国模无码大尺度一区二区三区| 国产.欧美.日韩| 色视频欧美一区二区三区| 91精品国产美女浴室洗澡无遮挡| 26uuu精品一区二区三区四区在线| 国产色产综合产在线视频| 亚洲精品美腿丝袜| 国产中文字幕精品| 色综合久久久久| 日韩手机在线导航| 国产精品初高中害羞小美女文| 亚洲国产人成综合网站| 国产精品一区二区在线观看不卡| 91一区在线观看| 欧美一级视频精品观看| 一区二区三区四区不卡视频| 久久超碰97人人做人人爱| 91视频一区二区| 精品99一区二区| 亚洲va欧美va人人爽午夜| 国产剧情在线观看一区二区| 欧美日韩国产成人在线免费| 日本一二三不卡| 九九视频精品免费| 欧美日韩中文字幕一区二区| 国产精品午夜免费| 国内偷窥港台综合视频在线播放| 精品视频全国免费看| 国产精品久久久久天堂| 国内精品免费**视频| 欧美美女一区二区三区| 一区二区三区四区亚洲| 成人精品gif动图一区| 久久综合色8888| 秋霞影院一区二区| 91精选在线观看| 亚洲国产成人va在线观看天堂| www.日韩av| 久久亚洲欧美国产精品乐播| 日本最新不卡在线| 欧美日韩亚洲综合一区 | 色综合色狠狠综合色| 国产女同性恋一区二区| 黄网站免费久久| 欧美不卡视频一区| 国产在线日韩欧美| 久久久午夜精品理论片中文字幕| 老司机精品视频一区二区三区| 欧美精选在线播放| 亚洲大尺度视频在线观看| 欧美日韩另类一区| 亚洲二区在线视频| 91精品国产综合久久精品麻豆| 亚洲电影视频在线| 欧美一级久久久| 狠狠色狠狠色综合系列| 久久久久免费观看| 成人精品视频一区二区三区尤物| 国产欧美一区二区三区在线看蜜臀 | 久久国产精品露脸对白| 一区二区高清视频在线观看| 精品电影一区二区| 久久久精品影视| 日韩专区中文字幕一区二区| 69堂亚洲精品首页| 色婷婷激情久久| 欧洲一区在线电影| 国产成人精品午夜视频免费| 成人aaaa免费全部观看| 中文字幕在线观看不卡视频| 91在线观看成人| 亚洲国产成人高清精品| 日韩免费福利电影在线观看| 国产福利一区二区三区视频在线 | 欧美日韩一区二区在线视频| 日韩在线卡一卡二| 国产一区二区三区av电影| 国产美女一区二区三区| 99热99精品| 日韩欧美国产午夜精品| 亚洲国产精品综合小说图片区| 国产精品高潮呻吟| 欧美一卡二卡在线| 婷婷开心激情综合| av影院午夜一区| 欧美精品一区二区不卡| 亚洲成年人影院| 国产精品不卡在线观看| 午夜欧美大尺度福利影院在线看| 午夜精品福利一区二区蜜股av| 欧美老女人第四色| 亚洲激情男女视频| 青青草成人在线观看| 国产91精品久久久久久久网曝门| 欧美成人三级电影在线| 国产欧美综合色| 国内精品免费在线观看| 国产精品国产成人国产三级| 九九**精品视频免费播放| 成人成人成人在线视频| 亚洲福利一二三区| 成人av一区二区三区| 久久久青草青青国产亚洲免观| 美女一区二区视频| 国产精品麻豆视频| 成人白浆超碰人人人人| 亚洲精品视频一区二区| 欧美精品久久99久久在免费线| 亚洲国产精品久久艾草纯爱| 久久久久九九视频| www.在线欧美| 亚洲人成亚洲人成在线观看图片| av日韩在线网站| 日韩成人av影视| 国产精品国产三级国产aⅴ中文| 欧美日韩亚洲综合一区 | 97国产一区二区| 亚洲欧美中日韩| 色综合久久久久综合99| 日韩精品成人一区二区三区| 欧美一区二区三区在线视频 | 在线亚洲高清视频| 日韩av一区二区在线影视| 中文字幕高清不卡| 538在线一区二区精品国产| 国产伦精品一区二区三区视频青涩| 亚洲激情图片小说视频| 韩国视频一区二区| 成人福利视频网站| 九九九精品视频| 日韩高清不卡一区二区| 中文字幕精品—区二区四季| 6080午夜不卡| 日韩午夜小视频| 在线一区二区视频| 色综合婷婷久久| 亚洲一区二区三区四区在线 | 欧美日韩国产大片| 青草国产精品久久久久久| 亚洲精品成人a在线观看| 偷窥少妇高潮呻吟av久久免费 | 国产一区二区视频在线| 亚洲国产精品激情在线观看| 久久久久久麻豆| 国产日产亚洲精品系列| 国产精品视频第一区| 亚洲欧美另类小说| 亚洲va韩国va欧美va| 久久99精品久久只有精品| 国产老女人精品毛片久久| 99久久精品国产网站| 欧美日韩中文另类| 久久久美女艺术照精彩视频福利播放| 久久亚洲一区二区三区明星换脸 | 亚洲免费看黄网站| 亚洲成人激情综合网| 精品亚洲aⅴ乱码一区二区三区| 国产酒店精品激情| 91久久精品网| 欧美变态tickling挠脚心| 国产精品你懂的在线| 亚洲va中文字幕| 国产精品18久久久久久久久久久久| 91亚洲精品乱码久久久久久蜜桃| 宅男噜噜噜66一区二区66| 欧美极品aⅴ影院| 天天做天天摸天天爽国产一区| 国产成人av电影免费在线观看|