Tag Info

New answers tagged

5

Just use luatexja. The Chinese TeX community decide not to develop a new package but use luatexja, because the tools designed for Chinese and Japanese usually work the same. The developer version of our ctex package will provide a Chinese customized interface for luatexja. Now you can use luatexja directly. Here is an example: % !TEX encoding = UTF-8 % ...


11

We can define a command to switch to a fallback font using fontspec. Then we can use newunicodechar to map the missing Unicode characters to a command that switched to the fallback font for those characters. \documentclass{article} \usepackage{fontspec, newunicodechar} \setmainfont{PT Serif} \newfontfamily{\fallbackfont}{Linux Libertine ...


4

The MinionPro font that comes with Adobe Reader does not have these symbols: In short, you can't use characters from a font that doesn't have those characters. This is therefore not a question about TeX, and you seem to acknowledge that in your question, asking if it "can really be true" that Adobe's MinionPro font doesn't have these symbols. I'm ...


10

The quotation (and hence the question:-) seem to be mixing up different concepts. There is the difference between having fonts at a design size or simply magnifying them. (so the difference between cmr10 scaled to 12pt and cmr12, as shown in other answers). Note this is really a distinction about the computer modern fonts rather than about TeX or the ...


8

An example is worth a thousand words; I used Plain TeX for better showing what's going on, with the explicit sizes shown. \font\testhuge=cmr17 \font\testhugescaled=cmr17 at 10pt \font\testbig=cmr12 \font\testbigscaled=cmr12 at 10pt \font\testsmall=cmr7 \font\testsmallscaled=cmr7 at 10pt \font\testtiny=cmr5 \font\testtinyscaled=cmr5 at 10pt ...


6

Example of "correctly balanced thickness", using Computer Modern, and with a large zoom factor on the PDF before I made the screenshot: \documentclass{article} \begin{document} {\Huge ABCDEF} ABCDEF \end{document} Compare the height of the A to the width of its right serif. The larger size is roughly 281 pixels high, and the serif is roughly 85 pixels ...


3

Unbalanced thickness may refer to the fact that a scaled font produces as a consequence thicker large characters and thinner small characters, always in comparison to the «normal» or intended size of the given font. If you have a family typeface with different optical sizes (as, for instance, Minion Pro), you can balance the character weight, so that ...


5

Reading the documentation reveals that characters are classified in “ALchars” and ”JAchars” and that Cyrillic is assigned to “JAchars”. Just reassign: \ltjsetparameter{jacharrange={-1, -2, +3, -4, -5, +6, +7, +8}} (the standard declaration has +2, see section 4.1 of the documentation). Of course you have to use a font that supports Cyrillic, which TeX ...


2

With XeTeX you do not need multiple size declarations, and I believe you should not with LuaTeX. In what follows, I'll refer to @Ludenticus' solution as (1), and mine, which follows, as (2): \documentclass[12pt,a5paper]{memoir} \setlrmarginsandblock{1cm}{*}{1} \usepackage{fontspec} \setmainfont{Minion Pro}[% SizeFeatures={% {Size={-8.4},Font=* ...


9

You have to specify the font for each feature. See section 5.1.2. of the fontspec manual. A XeTeX MWE: \documentclass[12pt]{memoir} \usepackage{fontspec} \setmainfont[% UprightFeatures={ SizeFeatures={ {Size={-8.4},Font=MinionPro-Capt}, {Size={8.4-13},Font=MinionPro-Regular}, ...


3

If you follow the suggestion given in my answer to How to write authors of an article to the file?, when you compile paper1.tex you'll have a file called paper1-titleauthors.dat which will contain something like \thispapertitle{Title of the article} \thispaperauthor{First Author} \thispaperauthor{Second Author} \finishauthors Now you can use the data: ...


6

The bug in this case is the calc library where a line in the definition of \tikz@cc@scan@rot is missing a % character at the end which affects the parsing of angles in coordinate calculations, for example, parsing 90:(0,1) in (0,0)!.5!90:(0,1). I don't know why this didn't affect xelatex though. The corrected definition should read as follows: ...


15

Here's an excerpt from the introductory chapter of the LuaTeX reference guide (version 0.79.2): Features may come and go. The current version of LuaTeX is not meant for production and users cannot depend on stability, nor on functionality staying the same. Nothing is considered stable just yet. This manual therefore simply reflects the current state of ...


4

The error message is indeed far from clear, but the issue is that there's no coverage of Cyrillic in the default sans serif font. Note that scrartcl uses sans serif font for the titles, by default. So you need to set a Cyrillic font also for sans serif, naming it \cyrillicfontsf. A similar problem would raise also for the typewriter type family: set ...


8

This is an attempt to document how I understand it. It is not ment to be authorative or so. LuaTeX (the nodes-side) does not have any automatic garbage collection. If you lose a pointer to a node, it is lost in TeX's memory and eats up space. With node.free() you can free a node and all its children. That is, if you have a hlist node, node.free() will ...


4

very basic use would be \documentclass{article} \usepackage{fontspec} \setmainfont{MS PGothic} \begin{document} 我希望這是,翻譯是由谷歌提供的中國文字。 \end{document}


5

This uses just pdflatex. Answer has been EDITED to screen out (catcode 12) "punctuation" in discerning if a word is "all caps". REEDITED to take multi-paragraph arguments. EDITED to work properly when paragraph ends on a \] environment. EDITED to enhance scope containment features as follows: Use of {...} will provide scope containment, but any CAPS ...


9

This is clearly a bug in LuaTeX. If, with your setup, I do \sbox0{$\mkern9mu$}\showthe\wd0 \scriptspace=0pt \sbox0{$_{\mkern9mu}$}\showthe\wd0 I get 5.4749pt for the first width and 5.9749pt for the second one. It's similar if I use newtxmath or fourier for the math fonts or even if no font package (including fontspec) is loaded, when LuaLaTeX should ...


6

As mentioned in comment (quicker than my answer...), there are 'normal' numbers available in EB Garamond. You can access them like here: % arara: lualatex \documentclass{article} \usepackage{fontspec} \setmainfont[Numbers=Lining]{EB Garamond} \begin{document} Test: 123456 \end{document}


11

Although the question is about parsing JSON in LaTeX, since the OP wants to "have my own style, which can be change very fast", I'll give a ConTeXt solution for its simplicity. ConTeXt already comes up with a parser for JSON. To use it, simply load \usemodule[json] Then, you can use the Lua function utilities.json.tolua to convert JSON string to Lua ...


12

Try this: \documentclass{scrbook} \usepackage{luacode} \begin{filecontents*}{test.json} { "recipe": { "title":"First recipe", "source":"My first cookbook", "carbs":"1 oz", "fat":"1 oz", "protein":"1 oz", "cal":"100 kcal", "ingredients": [ {"item":"Eggs"}, {"item":"Oil"}, {"item":"Nuts"} ], ...


12

As always, I missed David's comment, so my idea is not 100% original. :) As David said in the chatroom, he subliminally gave me a hint, which proves his powers are beyond comprehension, and that ducks aren't noted for their powers of comprehension normally. :) Attention: Although my answer works, please favour Yiannis' answer since it uses a module from ...


34

pdfTeX is intended to offer complete compatibility with Knuth's TeX, and thus if the e-TeX extensions are not enabled should act in the same way. XeTeX is based on the e-TeX code and does not set out to break any compatibility with Knuth's TeX unless it is absolutely necessary (i.e. there is no reimplementation of algorithms unless this relates to adding ...


3

animate uses \pdf@filemdfivesum from the pdftexcmds package to avoid multiple inclusion of the same file. It calculates the MD5 check sum of files to be embedded. The reported error occurs on Windows only. The reason is that Windows distinguishes between opening files in text and binary mode. The C fopen() is mapped to Lua io.open() and uses the same ...


4

There is a stray space in the file lltjp-listings.sty 194 % hook! 195 \lst@AddToHook{Init}{ 196 \luatexcatcodetable\CatcodeTableLTJlistings\ltj@@listing@jpcmd 197 \lccode`\~="FFFFF\lowercase{\def~{\ltj@lst@ProcessJALetter}}%" (line numbers added for convenience) that should be % hook! \lst@AddToHook{Init}{%<--------HERE!!! ...


4

Replacing the two § with ^^a7 in tcbdocumentation.code.tex should work.



Top 50 recent answers are included