Proofreading .tex files is easier if Greek & math characters already appear as such there. I used to deal with these characters using extended ASCII in Mac OS Roman encoding & viewing with my own font. I replaced that with the more modern utf-8 (Unicode) & viewing with standard Unicode fonts. (This approach works on all platforms.) Utf-8 has 17×2¹⁶ characters, compared to the measly 2⁸-character extended ASCII, so this allows almost all math symbols, excluding super/subscripts (except for numerals & signs), to appear literally before processing. So far it seems LuaLaTeχ is the most convenient for adding new characters: e.g., \catcode`§=13 \def §{\section}.
For (@ least) TeXShop on the Mac, the .tex source file would begin with (before \documentclass)
% !TEX program = lualatex % !TEX encoding = UTF-8 UnicodeThe 1st line is to automatically recognize the Teχ engine (to save you another button; you can also use "TS-program" instead of "program"): Move the lualatex engine from ~/Library/TeXShop/Engines/Inactive/LuaTeX/ to .../Engines/. The 2nd is for file encoding (if utf-8 isn't already your default). Don't forget to set Edit > Substitutions > Text Replacement (using settings in System Preferences > Keyboard > Text).
Also, LaTeχ packages have already been written to recognize Unicode math, not just foreign languages: E.g., such a LuaLaTeχ file might begin
\documentclass[12pt]{article} \usepackage{amsmath} % needed for align & subeqs; must load before unicode-math \usepackage[math-style=ISO,colon=literal]{unicode-math} % \setmathfont{STIX Two Math} % most characters; Times-like % \setmainfont{XITS} % \setsansfont{TEX Gyre Heros}The unicode-math package is for recognizing (converting to Teχ) Unicode math. (math-style=ISO is an option to make capital Greek "italic". colon=literal keeps math colons like text colons.) The commented font commands would be for output in Times New Roman-like fonts, rather than the default Computer Modern-like fonts Latin Modern. (The Teχ standard Computer Modern fonts are not Unicode, although there are "Computer Modern Unicode" fonts. STIX Two Text has optical size 10, and so is less elegant than standard Times New Roman clones like XITS.)
But I wanted a little customization:
To use an iCloud folder for personal texinputs (incl. luainputs), you need to put a .profile (suggested by the author) something like this in ~/Documents in the a-Shell sandbox (the folder where a-Shell starts):
jump inputs
cd -
setenv TEXINPUTS .:/private/var/mobile/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/tex/inputs//:
setenv LUAINPUTS .:/private/var/mobile/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/tex/inputs//:
setenv BIBINPUTS .:/private/var/mobile/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/tex/inputs/bib//:
setenv BSTINPUTS .:/private/var/mobile/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/tex/inputs/bst//:
alias b bibtex
alias f pickFolder
alias j jump
alias l lualatex
alias p pwd
alias s showmarks
where /Documents/tex/inputs/ is where I located my texinputs in iCloud, & inputs is the bookmark made when I used pickFolder to go there.
(Note that folder/filenames with spaces need \'s: " " → "\ ".)
This was facilitated by a few Unixy commands:
\AtBeginDocument{\directlua{require("combining_preprocessor.lua")}}Here are a few of the definitions I made for this: First, mostly to modify dots,
% accent over: \def\on#1#2{{\buildrel{{\mkern2.5mu\raise-.1em\hbox{$\scriptstyle#1$}\mkern-2.5mu}}\over{#2}}} \def\ron#1#2{{\buildrel{{\raise-.1em\hbox{$\scriptstyle#1$}}}\over{#2}}} % for unitalicized \def\dt#1{\on{\hbox{\bf .}}{#1}} % (big) dot over: see ̇ below \def\ddt#1{\on{\hbox{\bf .\kern-1pt.}}#1} % double dot: see ¨ below \def\under#1#2{\mathop{\null#2}\limits_{#1}} % accent underthen to allow Unicode typing of various characters, those math accents, & others:
% otherwise undefined utf-8 \catcode`❴=13 \def ❴{\{} % Option-{ \catcode`❵=13 \def ❵{\}} % Option-} \catcode`√=13 \def √{\sqrt} % Option-M \catcode`§=13 \def §{\section} % Option-i \catcode`¶=13 \def ¶{\subsection} % Option-I % spaces \catcode`⎵=13 \def ⎵{\nobreak\ } % Option-0 \catcode`⸏=13 \def ⸏{\quad} % Option-) %\catcode`␣=13 \def ␣{\TextOrMath{\thinspace}{\,}} % (open box) \catcode`˽=13 \def ˽{\TextOrMath{\thinspace}{\,}} % Option-space (modifier letter shelf) % combining characters \def\̂#1{\TextOrMath{#1̂}{\hat{#1}}} % Option-6 \def\̌#1{\TextOrMath{#1̌}{\check{#1}}} % Option-V \def\̃#1{\TextOrMath{#1̃}{\tilde{#1}}} % Option-n \def\́#1{\TextOrMath{#1́}{\acute{#1}}} % Option-~ \def\̀#1{\TextOrMath{#1̀}{\grave{#1}}} % Option-` \def\̇#1{\TextOrMath{#1̇}{\dt{#1}}} % Option-; \def\̈#1{\TextOrMath{#1̈}{\ddt{#1}}} % Option-: \def\̆#1{\TextOrMath{#1̆}{\breve{#1}}} \def\̄#1{\TextOrMath{#1̄}{\bar{#1}}} % Option-- \def\̊#1{\TextOrMath{#1̊}{\mathring{#1}}} % Option-A \def\⃗#1{\vec{#1}} % Option-R \def\⃡#1{\overleftrightarrow{#1}} % Option-E \def\⃖#1{\overleftarrow{#1}} % Option-W \def\̸#1{\slashed{#1}} % Option-/ % with single character only %\def\͞#1{\overline{#1}} % (combining double macron) \def\̅#1{\overline{#1}} % Option-? (combining overline) %\def\̱#1{\underline{#1}} % (combining macron below) \def\̲#1{\underline{#1}} % Option-_ (combining lowline) %\def\͡#1{\widehat{#1}} % (combining double inverted breve) \def\᷍#1{\widehat{#1}} % Option-^ (combining double circumflex above) \def\͠#1{\widetilde{#1}} % Option-N(The commented Option-characters are the way I type them with my keylayout: See my Unicode page for details.) Then α̇α̌ᾱα̃α̸... in the .tex source comes out that way in the pdf.
\usepackage{hyperref} \hypersetup{ bookmarksnumbered, % (sub)section numbers in bookmarks unicode, % use with \texorpdfstring colorlinks, % avoid stupid boxes citecolor=[rgb]{.9,0,.5}, % \cite urlcolor=[rgb]{0,0,1}, % \href linkcolor=[rgb]{0,.7,0} % \ref , toc }unicode is for using the macro \texorpdfstring{ }{ } in (sub)section headings, for the few cases not already covered by unicode-math (or your macros), where the former argument is for the tex to make it appear in the usual way in the body (e.g., {\LARGE$\bigcirc$}\hskip-.2in{\normalsize$\ddot\smile$}) & the latter for code to make it appear as unicode in the bookmarks (e.g., 🙂).
\bibliographystyle{utphys}
A recently improved version from Dharmesh Jain is hephys.bst.
To avoid doing pdflatex, bibtex, pdflatex, pdflatex, move the latexmk engine from ~/Library/TeXShop/Engines/Inactive/Latexmk/ to .../Engines/. The only menu item it will appear in is the Program list in the source window bar (so you'll need that button as well as the Typeset one). Or begin the file with
%% !TEX program = latexmkSimilar remarks apply to lualatex & lualatexmk.
\usepackage{cite} % for citations like [1-10] & not [1,2,3,4,5,6,7,8,9,10]
\usepackage{slashed} % Feynman: see ̸ above
\usepackage{microtype} % fewer hyphens, etc.
\def\fig#1{\pdfximage {#1}\pdfrefximage\pdflastximage} \def\figscale#1#2{\pdfximage width#2 {#1}\pdfrefximage\pdflastximage}
\def\fig#1{\saveimageresource {#1}\useimageresource\lastsavedimageresourceindex} \def\figscale#1#2{\saveimageresource width#2 {#1}\useimageresource\lastsavedimageresourceindex}
\catcode`@=11 \@addtoreset{equation}{section} \catcode`@=12 \numberwithin{equation}{subsection}or just \numberwithin{equation}{section} for section.
\def\eq#1{\begin{equation}#1\end{equation}} \def\al#1{\begin{align}#1\end{align}} \def\se#1{\begin{subequations}\begin{align}#1\end{align}\end{subequations}} \def\ma#1{\begin{pmatrix}#1\end{pmatrix}}
\documentclass[12pt]{article} % for landscape \pdfpagewidth=11in \pdfpageheight=8.5in \textwidth=10in \textheight=7.5in \topmargin=-1in \oddsidemargin=-.5in \evensidemargin=-.5in \parindent=0in % so people won't keep asking, "How much more do you have?" e.g., for 11 slides \setcounter{page}{-10} \begin{document} % big, bold, san serif \Huge\sffamily\bfseries\boldmath(For lualatex, take the "pdf" out of the \pagewidth & \pageheight commands, & replace \Huge with something like \fontsize{27pt}{36pt}\selectfont .)
You may also want the shield by itself for other purposes, so here's shield.pdf.