The best Latex Editor for MAC

Maybe first you will remind me that MacTex, which is popular now.

Anyway: I refer some article and find there are also many other tools.

refer from : https://discussions.apple.com/message/18653515#18653515

There are quite a few “integrated” solutions, combining editor and pdf preview (the very fine TeXShop being one of them) — some of them are quite new (even beta); TeXShop, on the other hand, is very mature:

TeXPad:

http://vallettaventures.com/texpad

Latexian:

http://tacosw.com/latexian/

TeXnicle:

http://www.bobsoft-mac.de/texnicle/texnicle.html

Scribo:

http://www.scriboapp.com/

Texmaker (cross-platform, qt-based; all the others are OS X native):

http://www.xm1math.net/texmaker/index.html

 

You can also check the entries, and the comments, on Macupdate:

http://www.macupdate.com/find/mac/latex

 

That said, I use none of them, although I have TeXShop around. (This doesn’t mean the new integrated solutions aren’t any good; I haven’t tried them yet.)

 

That’s because what’s most important, imho, in a good LaTeX environment is the editor, i.e., how much help is there to get the source written. Accordingly, many people would agree that the best editor available plus a fine synchronised, but stand-alone pdf viewer is superior than a (compromising, or so the musing goes) all-in-one tool.

 

The, hands-down, best pdf viewer, supporting PDFSync (syncing source and pdf), is Skim; it’s free:

http://skim-app.sourceforge.net/

 

As regards the best editor, there is constant disagreement among OS X users, some would even say “war” — but that just shows how vivid the Mac ecosphere is when it comes to such tools.

 

Leaving the “classics” aside, Emacs (Aquamacs, http://aquamacs.org/) and Vim (Macvim, http://code.google.com/p/macvim/), dreaded for their learning curve, worshipped for their power, two of the best, modern, clean, yet powerful editors are TextMate and Sublime Text 2:

 

http://macromates.com/

helpful: http://www.astrobetter.com/how-and-why-to-use-textmate-for-latex/

 

http://www.sublimetext.com/2

helpful: http://tekonomist.wordpress.com/2011/03/25/the-in-progress-latex-plugin-for-subl ime-text-2-4/

 

Many would hold that the combination of either TextMate (2) or Sublime Text 2 together with Skim provides the best LaTeX environment ever.

Homebrew — The missing package manager for OS X

 

HomebrewThe missing package manager for OS X

 

Homebrew installs the stuff you need that Apple didn’t.

$ brew install wget

Install Homebrew

ruby -e "$(curl -fsSL

https://raw.github.com/Homebrew/homebrew/go/install)"

Paste that at a Terminal prompt.

The script explains what it will do and then pauses before it does it.

So maybe sometimes you can use brew to install some software you couldn’t find in AppStores..

 

website : http://brew.sh/index.html

rpm or yum error: %preun( ) scriptlet failed, exit status 1

rpm删除出现”error: %preun( ) scriptlet failed, exit status 1解决方法

 

今天删除软件的时候报了下面的这个错误:

错误提示是:error: %preun(xxxxxx) scriptlet failed, exit status 1

 

最后在网上找到一个办法,就是加noscripts 标记来删除RPMnoscripts 相当于 -nopre -nopost  -nopreun -nopostun

即卸载命令变为:

$rpm -e –noscripts xxxxxx

若要查看与RPM关联的scripts,使用-script查询RPM包。

rpm -q -scripts package

卸载时,若系统里有同一程序的多个安装版本要一起删除,可使用-allmatches标记,如

rpm -e –noscripts -allmatches xxxxxx

perl: warning: Setting locale failed

 

有时apt-get install的时候,会出现下面的错误:

 

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

       LANGUAGE = “en_US:en”,

       LC_ALL = (unset),

       LC_CTYPE = “en_US.UTF-8”,

       LC_COLLATE = “en_US.UTF-8”,

       LC_MESSAGES = “en_US.UTF-8”,

       LANG = “en_US”

    are supported and installed on your system.

perl: warning: Falling back to the standard locale (“C”).

 

解决方法上面也有了提示就是:Falling back to the standard locale

所以解决办法是:

vi /root/.bashrc

在最底部添加上一句

export LC_ALL=C

或者直接运行

#echo “export LC_ALL=C” >> /root/.bashrc

然后执行一下:

source /root/.bashrc

ERLANG QUICKSTART

ERLANG快速入门

refer from : http://www.erlang.org/static/getting_started_quickly.html

开始erlang

在终端中输入erl,即可看到如下所示:

$ erl
Erlang R14B (erts-5.8.1.1) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
Eshell V5.8.1.1  (abort with ^G)
1>

其中 “>” 表示系统正等待输入。将Erlang当做一个计算器:

1> 2*6.
12
2>

切记,每个表达式使用一个句点.来结束。

编辑以前的表达式

可以使用类似emacs行编辑命令来取回以前的表达式进行编辑。最常用的命令为:

  • ^P 获取前一行
  • ^N 获取下一行
  • ^A 移至当前行首
  • ^E 移至当前行尾
  • ^D 删除当前光标下字符
  • ^F 前移一个字符
  • ^B 后退一个字符
  • Return 执行命令

: ^X 表示Control + X

赶紧使用Control+P看看结果吧。

编译你的第一个程序

使用你最爱的编辑器输入下列内容:

-module(test).
-export([fac/1]).

fac(0) -> 1;
fac(N) -> N * fac(N-1).

保存为 test.erl ,注意文件名必须和模块名相同。

通过输入c(test) 来编译该程序然后运行它:

3> c(test).
{ok,test}
30> test:fac(20).
2432902008176640000
4> test:fac(40).
815915283247897734345611269596115894272000000000
32>