亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲国产精品精华液2区45| 蜜桃一区二区三区四区| 国产精品一级黄| 久久久亚洲午夜电影| 国产一区二区伦理片| 久久综合色婷婷| 国产寡妇亲子伦一区二区| 国产欧美一区二区三区鸳鸯浴| 国产一区二区三区视频在线播放| 欧美va亚洲va在线观看蝴蝶网| 毛片av一区二区三区| 精品国产乱子伦一区| 国产一区二区三区不卡在线观看| 久久久久久久久久久久久久久99 | 色综合久久综合| 亚洲裸体xxx| 欧美日韩国产色站一区二区三区| 日韩av中文字幕一区二区 | 国产免费成人在线视频| 成人激情免费网站| 亚洲综合一区二区| 欧美mv日韩mv国产网站app| 国产乱码精品一区二区三区忘忧草| 国产欧美一二三区| 91精品福利视频| 日韩av一区二区三区| 久久蜜桃一区二区| 在线亚洲一区观看| 九九国产精品视频| 亚洲丝袜自拍清纯另类| 91精品在线免费| 国产成人av网站| 亚洲成人你懂的| 欧美tk—视频vk| 在线观看91视频| 国产二区国产一区在线观看| 一区二区三区不卡在线观看| 欧美成人video| 在线视频中文字幕一区二区| 久久av中文字幕片| 亚洲综合免费观看高清在线观看| 久久你懂得1024| 欧美日韩高清影院| 成人av片在线观看| 久久福利资源站| 一区二区三区波多野结衣在线观看| 欧美电影免费提供在线观看| 色一情一乱一乱一91av| 国内精品视频666| 亚洲成人免费电影| 亚洲欧美一区二区在线观看| 精品国产a毛片| 666欧美在线视频| 色噜噜狠狠成人中文综合| 国产一区二区三区久久悠悠色av | 欧美一区二区成人| 色婷婷久久99综合精品jk白丝| 国产精品1024| 奇米四色…亚洲| 午夜不卡av免费| 一区二区三区四区乱视频| 国产人久久人人人人爽| 91精品久久久久久蜜臀| 欧美午夜精品久久久久久超碰 | 亚洲日本欧美天堂| 日本一区二区免费在线观看视频 | 欧美激情一区二区三区四区| 欧美老肥妇做.爰bbww| 色婷婷av一区二区三区之一色屋| 丁香桃色午夜亚洲一区二区三区| 美腿丝袜亚洲综合| 三级在线观看一区二区| 一区二区三区四区在线免费观看| 中文字幕在线不卡视频| 国产亚洲欧美在线| wwww国产精品欧美| 精品国产一区二区国模嫣然| 91精品国产入口| 欧美剧在线免费观看网站| 欧美视频完全免费看| 日本丰满少妇一区二区三区| 99re成人在线| 99久久精品国产麻豆演员表| 成人av网在线| 色狠狠一区二区| 在线中文字幕一区| 欧美日韩大陆在线| 9191久久久久久久久久久| 欧美日韩精品一区二区在线播放| 欧美在线制服丝袜| 欧美日韩国产区一| 精品少妇一区二区三区免费观看 | 亚洲高清一区二区三区| 亚洲一级电影视频| 图片区小说区国产精品视频| 爽爽淫人综合网网站| 美女视频第一区二区三区免费观看网站 | 色婷婷精品大视频在线蜜桃视频| 成人动漫av在线| 91一区二区在线| 欧美日韩一区视频| 日韩欧美一区在线| 欧美精品一区二区蜜臀亚洲| 国产清纯白嫩初高生在线观看91 | 亚洲人xxxx| 亚洲国产精品一区二区久久恐怖片| 亚洲图片欧美色图| 久久精品国产99国产精品| 国产91在线看| 欧洲一区在线观看| 欧美电影免费提供在线观看| 中文子幕无线码一区tr| 亚洲成人精品一区| 国产综合一区二区| 99精品久久只有精品| 在线成人高清不卡| 国产三级一区二区三区| 国产九九视频一区二区三区| 成人免费毛片app| 欧美日韩国产系列| 国产精品欧美一区喷水| 久久亚洲欧美国产精品乐播| 欧美极品aⅴ影院| 亚洲成人av免费| 国产精品伊人色| 欧美中文字幕久久| 99久久免费精品| 国产精品毛片高清在线完整版| 欧美顶级少妇做爰| 一本久道久久综合中文字幕| 国产综合久久久久影院| 亚洲国产一区二区在线播放| 国产亚洲美州欧州综合国| 69成人精品免费视频| 色视频欧美一区二区三区| 国产精品自拍毛片| 日韩成人一区二区| 亚洲一区二区在线免费观看视频| 国产亚洲欧美激情| 亚洲精品一区二区三区四区高清 | www.色综合.com| 欧美96一区二区免费视频| 亚洲精品免费电影| 国产精品国产三级国产普通话蜜臀| 3d成人动漫网站| 欧美中文字幕不卡| 色视频一区二区| 色欧美乱欧美15图片| kk眼镜猥琐国模调教系列一区二区 | 亚洲少妇30p| 久久久综合精品| 亚洲精品在线三区| 日韩精品中文字幕在线一区| 欧美日韩不卡在线| 欧美三级电影网站| 欧美日韩视频专区在线播放| 色婷婷久久99综合精品jk白丝 | 久久精品国产免费看久久精品| 亚洲一区视频在线观看视频| 亚洲精品免费电影| 亚洲午夜羞羞片| 日韩精品乱码免费| 激情综合五月天| 国产精品一区二区在线看| 国产一区二区福利| 成人妖精视频yjsp地址| 国产成a人亚洲精品| av亚洲精华国产精华| 色婷婷国产精品综合在线观看| 欧美无乱码久久久免费午夜一区| 欧美性大战久久久久久久蜜臀| 欧美性大战久久久久久久| 欧美高清一级片在线| 日韩一级片在线播放| 久久蜜桃av一区二区天堂| 国产精品动漫网站| 亚洲国产精品自拍| 免费在线欧美视频| 国产成人av网站| 欧美视频日韩视频在线观看| 日韩精品一区二区三区蜜臀| 国产女人aaa级久久久级| 亚洲美女屁股眼交3| 亚洲自拍偷拍网站| 日本一区二区成人| 中文字幕字幕中文在线中不卡视频| 一级女性全黄久久生活片免费| 丝袜诱惑亚洲看片| 国产福利精品导航| 麻豆高清免费国产一区| 国产91精品久久久久久久网曝门| 色综合久久久久综合99| 欧美一区二区三区婷婷月色| 日本一区二区三区视频视频| 亚洲国产wwwccc36天堂| 极品销魂美女一区二区三区| 91久久精品一区二区三区| 精品捆绑美女sm三区| 亚洲精品国产a久久久久久| 久久爱www久久做|