[XeTeX] XeTeX wish list ...
I do not know whether there is such a thing, but if there is, may I add an entry ? Background: I have (XeTeX) code which adds bleed and crop marks (strictly speaking, bleed and trim marks) to an existing multipage PDF. The code is stored in a file called "Add bleed + cropmarks.tex". When run, it asks the user for the name of the PDF file to be used as input, but of course the resulting PDF output file is always called "Add bleed + cropmarks.pdf". Request : Would it be possible to enhance XeTeX such one could write (e.g.,) \XeTeXpdffile = "Hội-An lunch menu with bleed and crop marks" before any data has been entered on the MVL, and then have the output file name be taken from \XeTeXpdffile ? If \XeTeXpdffilename were set only after data had entered the MVL, it would be completely acceptable for the output file name to be taken from \jobname as at present. It would (IMHO) be more elegant to make \jobname read/write, but that would introduce an unnecessary deviation from TeX. -- Philip Taylor This email, its contents and any attachments are intended solely for the addressee and may contain confidential information. In certain circumstances, it may also be subject to legal privilege. Any unauthorised use, disclosure, or copying is not permitted. If you have received this email in error, please notify us and immediately and permanently delete it. Any views or opinions expressed in personal emails are solely those of the author and do not necessarily represent those of Royal Holloway, University of London. It is your responsibility to ensure that this email and any attachments are virus free.
Re: [XeTeX] which TeX-based software
Mojca Miklavec wrote: It is of course completely free and opensources, no licences (that is also true for nearly all TeX anyway). No licence ? It will never get into TeX Live then :-) From https://tug.org/texlive/LICENSE.TL: LICENSING FOR NEW PACKAGES: Finally, we are often asked what licence to use for new work. To be considered for inclusion on TeX Live, a package must use a free software licence [...] -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] which TeX-based software
Carrs wrote: Hi, a newbie question. I would like advice on which TeX-based software it would be best to learn in detail for my typesetting plans. So far, I have learned a little TeX and a little LaTeX, but not enough of either to tell me which will work best for me. The features I want to be able to typeset are: [many and complex] XeTeX can do all of these, but the intellectual effort required of a beginner is likely to prove nigh unsurmountable. I expect that XaLaTeX can do the same with somewhat less intellectual input, but as I never use LaTeX in any guise I am not the best person to advise. Philip Taylor -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
[XeTeX] Could Adobe Photoshop's "blending options" for text be supported in a future {Pdf|Xe}TeX variant
I have been playing with Adobe Photoshop's "blending options" for text recently, adding a gold or metallic texture to otherwise plain text. The results are visually very striking, and I therefore began to wonder whether similar functionality might one day be added to Pdf/XeTeX, in the former case natively and in the latter case via \specials and an extended (x)dvipdfm(x) driver. Three examples of the sorts of effect I have in mind can be seen at : https://www.dropbox.com/s/b7a1383rb1dx2vp/Ao%20dais.pdf?dl=0 https://www.dropbox.com/s/7s6s7n9w8popiyg/MENU%20001%20new%20ellipse.pdf?dl=0 https://www.dropbox.com/s/smmcjy9zuuxa1nu/MENU%20001%20%28metallic%20gold%20text%20demo%29.pdf?dl=0 I would be interested in others' reactions to this. Philip Taylor -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] Query : obtain font name when opening font by filename ?
Just in case anyone found the earlier code interesting, here is an improved version that (a) does not miss every second font (!) and (b) does its best to normalise font heights. % !TeX Program = XeTeX \magnification \magstep 4 \vsize = 210 true mm \hsize = 297 true mm \pdfpagewidth = \hsize \pdfpageheight = \vsize \advance \hoffset by -1 true in \advance \voffset by -1 true in \newdimen \margin \margin = 1 cm \advance \hsize by -2 \margin \advance \vsize by -2 \margin \advance \hoffset by \margin \advance \voffset by \margin \baselineskip = 1,5 \baselineskip \parindent 0 pt \font \tenrm = "Gill Sans MT Condensed" \newdimen \tenpt \tenpt = 10 pt \def \process #1% {% \def \sampler ##1{\hbox to 0,6 \hsize {\font \thisfont = "[#1]" at ##1\thisfont Sample / SAMPLE\hfil}}% \setbox 0 = \sampler \tenpt % \dimen 0 = \tenpt \divide \dimen 0 by \numexpr \dimexpr 0,001 \ht 0 \relax \relax \multiply \dimen 0 by \numexpr \dimexpr 0,001 \tenpt \relax \relax \sampler {\dimen 0 }% {\rm #1} } \begingroup \catcode `\_ = \catcode `\@ \obeylines \everypar = {\shewfont} \def \shewfont #1 {% \process {#1} }% \input d:/fonts.txt % \endgroup \end -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
[XeTeX] Query : obtain font name when opening font by filename ?
Dear fellow XeTeX users -- The following short program iterates through a list of all system fonts (already indexed into D:\Fonts.txt) and displays a short sample text followed by the font filename. I would prefer it if the font filename could be replaced by the actual font name by which the font is known to the system, but I can find no appropriate primitive in the output from "TeXdoc XeTeX"; can anyone help, please ? Philip Taylor % !TeX Program=XeTeX \magnification \magstep 4 \vsize = 210 true mm \hsize = 297 true mm \pdfpagewidth = \hsize \pdfpageheight = \vsize \advance \hoffset by -1 true in \advance \voffset by -1 true in \newdimen \margin \margin = 1 cm \advance \hsize by -2 \margin \advance \vsize by -2 \margin \advance \hoffset by \margin \advance \voffset by \margin \parindent 0 pt \begingroup \catcode `\_ = \catcode `\@ \everypar = {\shewfont} \obeylines \def \shewfont #1 {\hbox to 0,5 \hsize {\font \thisfont = "[#1]" at 10 pt \thisfont Sample / SAMPLE\hfil }{\rm}}\par% \input d:/fonts.txt \endgroup \end Where D:/Fonts.txt starts : Adobe-Caslon-Bold-Italic.otf Adobe-Caslon-Bold.otf Adobe-Caslon-Italic.otf Adobe-Caslon-Semibold-Italic.otf Adobe-Caslon-Semibold.otf Adobe-Caslon.otf AGaramondPro-Bold.otf AGaramondPro-BoldItalic.otf AGaramondPro-Italic.otf AGaramondPro-Regular.otf ... -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] Xetex equiv to luatex's \directlua{}
maxwell wrote: I'm just finishing up a project that involved typesetting text in several languages, while outputting an XML file that defined in X/Y coordinates the position and size of the bounding box surrounding each line of text in the PDF. [...] [I]s there any way I could have done something similar using xetex? That is, called another programming language to output box positions and sizes. I suppose it's possible to write to an XML file in xetex natively, but I'm not sure how I could get the positions and sizes of boxes. Is it possible that these three PdfTeX/XeTeX primitives might help : \pdfsavepos Saves the current location of the page in the typesetting stream. \pdflastxpos Retrieves the horizontal position saved by \pdfsavepos. \pdflastypos Retrieves the vertical position saved by \pdfsavepos. Philip Taylor -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] Stroking a TeX rule in XeTeX
Many thanks, ZdenÄk. For the benefit of both posterity and non-CZ speakers, I append Google's translation of your article : ** Phil. Print outline of the font in PDF Zdenek Wagner The article shows the possibility of rendering the contour of the font by direct use of the operator PDF. It explains how to use the family of drivers (x) dvipdfm (x) also in pdfTEX. Possible complications are mentioned and the case can not be stated use the method. Keywords PDF, font contours, font fill, initials, Open Type, Type 1 1. Introduction Prints of some type, especially advertising, but also fiction, occasionally require it parts of the text were highlighted in a less usual way. An example of such the highlight is the initials at the beginning of this paragraph. It is not printed with a special font, it is a TEX Gyre Adventor wild-type font. The difference lies in the fact, that we did not print the character in the usual way, but we let the PDF show the outline, which we filled in a different color. This is enabled by fonts in formats Type 1 and OpenType define characters using the outline that are in normal print filled in by the selected color. We just used another way of rendering, which we will describe in detail below. 2. Display the font contour in PDF When viewing the contour of the font, we will use the special command to output directly to PDF operators. As with PostScript, there are parameters before the name of the operator. In the PDF documentation [1] we find Tr operator, whose description is not very comprehensible. And this operator determines how the font is displayed. The usual value of 0 causes a classic fill as you see it virtually in of all texts. Setting a value of 1 will show the outline without fill, value 2 allows the contour to be displayed in one color and the fill in another. Set the line thickness operator w, with the unit being a big point. Set the color either operator g and G (gray, the operator has one parameter), or rg and RG (color RGB space, three parameters), or k and K (CMYK color space, four parameters). Operators written in small letters set the fill color, operators in capital letters, determine the color of the line. The initiator has the opening paragraph setting 2 Tr .8 w 0 .1 1 .1 k .8 1 0 0 K. Before this setting the graphical state is stored by the operator q, and after printing the initials, the graphical state is restored operator Q. Everything looks very simple. So let us explain how it is mentioned we will get the commands to PDF. 2.1. Contour view in driver (x) dvipdfm (x) We start with the simpler case of the driver family (x) dvipdfm (x) [2]. The effect can also be used in X ETEX. The following demonstration We will print out a few words in outline. we created it with a command {\ centering \ Large \ fontfamily {qag} \ bfseries Several \ special {pdf: code q 2 Tr 0.7 w 0 .5 .5 .05 k 1 1 0 .1 K} words \ special {pdf: code 0 0 1 0 k 1 0 1 .1 K} we will print \ special {pdf: code Q} in outline. \ par} In older versions of driver (x), dvipdfm (x) is not available in the \ special command the code function, but only the put, but which inserts the content between q and Q, that is the desired effect is lost. It can be remedied by a simple trick, when these automatically Inserted operators are eliminated by a paired operator. In that case instead of \ special {pdf: code q 2 Tr}, we will write the modified code with the added operators \ special {pdf: Put Q q 2 Tr q}. The command \ special {pdf: put Q} none does not need modification. 2.2. Outline view in pdfTEX Inspired by the previous example, we write the code mechanically using the primitive \ pdfliteral [3] as follows: {\ centering \ Large \ fontfamily {qag} \ bfseries One \ pdfliteral {q 2 Tr 0.7 w 0 0 1 0 k ~ 1 0 1 .1 K} word \ pdfliteral {Q} different. \ par} However, the result does not meet our expectations. The word will be otherwise overwritten and, in addition, the rate of the remainder of the article is
[XeTeX] Stroking a TeX rule in XeTeX
The following code applies a 3 pt blue stroke to red-filled glyphs, but has the undesirable side-effect of changing the colour of TeX rules to the stroke colour. Is it possible, does anyone know, to control the stroke and fill colour of TeX rules (a) independently, and (b) orthogonally to that of TeX glyphs ? Philip Taylor % !TeX Program=XeTeX \magnification 4096 \hsize = 210 true mm \vsize = 297 true mm \pdfpagewidth = \hsize \pdfpageheight = \vsize \advance \hoffset by -1 true in \advance \voffset by -1 true in \font \tenrm = "Calibri Bold" \let \Hrule = \hrule \let \Vrule = \vrule \def \hrule {\Hrule height 4 true pt depth 4 true pt} \def \vrule {\Vrule width 8 true pt} \topskip 0 pt plus 1 fill \special{pdf:bcolor [1.0 0.0 0.0] [0.0 0.0 1.0]} % first defines fill colour, second stroke colour \special{pdf:literal direct 0.3 w 2 Tr} stroke width followed by rendering mode \centerline {% \vbox spread 1 pc \bgroup \hsize = 0,210 \hsize \hrule \vss \hbox to \hsize {\vrule \hss Hello\hss \vrule} \vss \hrule \egroup } \end -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] Devanagari ASCII to Unicode mapping
Daniel Greenhoe wrote: I think the conclusion is that I was going about the problem the wrong way---that there is no one-to-one mapping between the Devanagari ASCII font and unicode font. Rather, it is many-to-one. Is the problem not, in fact, that there is not one "Devanagari ASCII font" but rather many, for each of which there is potentially a different mapping required ? Philip Taylor -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
Re: [XeTeX] "typeset by bidi" message
Peter Wilson wrote: I think that the "Typeset by the bidi package" message is much too modest. It should read something along the lines "Typeset by the bidi package developed by Vafa Khalighi for over 12 years without any funding or donations." In fact I think that every class/package used in a document should typeset similar wording about itself and its provenance on the top of the first page of any (All)TeX document. Many classes and packages have been developed over many more than 12 years, particularly TeX and LaTeX. As \usepackage is under the control of the LaTeX team, could its behaviour not be amended to check if #1 = "bidi", and if so, interpolate "[logo=off] unless "[logo=on]" is already present ? Philip Taylor \usepackage[logo=off]{bidi} -- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex