How to include a .bmp image in XeTex using plain TeX source file The Next CEO of Stack OverflowHow to get hanging hyphenation?Producing arXiv-submittable documents with figures using plain TeXWhy is LyX trying to convert every image into eps?Anybody ever encountered “arithmetic: number too big” when importing an image?Attaching files using plain TeX (pdfTeX)moving from old plain TeX to XeTeXPlain TeX and XeTeXUsing Xetex to Include bmp file into document using Plain TeXHow to save a bmp image from the internet for use in XeTeXHow to integrate my macros in ProTEXT
Traduction de « Life is a roller coaster »
Why don't programming languages automatically manage the synchronous/asynchronous problem?
Can this note be analyzed as a non-chord tone?
Does destroying a Lich's phylactery destroy the soul within it?
what's the use of '% to gdp' type of variables?
"Eavesdropping" vs "Listen in on"
Reference request: Grassmannian and Plucker coordinates in type B, C, D
Getting Stale Gas Out of a Gas Tank w/out Dropping the Tank
What was Carter Burkes job for "the company" in "Aliens"?
In the "Harry Potter and the Order of the Phoenix" videogame, what potion is used to sabotage Umbridge's Speakers?
Defamation due to breach of confidentiality
Are the names of these months realistic?
Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?
Easy to read palindrome checker
Is there a way to save my career from absolute disaster?
Audio Conversion With ADS1243
Purpose of level-shifter with same in and out voltages
Towers in the ocean; How deep can they be built?
What flight has the highest ratio of timezone difference to flight time?
Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?
How to use ReplaceAll on an expression that contains a rule
Traveling with my 5 year old daughter (as the father) without the mother from Germany to Mexico
Strength of face-nailed connection for stair steps
Is there a reasonable and studied concept of reduction between regular languages?
How to include a .bmp image in XeTex using plain TeX source file
The Next CEO of Stack OverflowHow to get hanging hyphenation?Producing arXiv-submittable documents with figures using plain TeXWhy is LyX trying to convert every image into eps?Anybody ever encountered “arithmetic: number too big” when importing an image?Attaching files using plain TeX (pdfTeX)moving from old plain TeX to XeTeXPlain TeX and XeTeXUsing Xetex to Include bmp file into document using Plain TeXHow to save a bmp image from the internet for use in XeTeXHow to integrate my macros in ProTEXT
Using XeTeX, I would like to insert a bitmap image file which is in .bmp format, or alternatively, the same image in a .jpg format. I am using plain TeX, not LaTeX.
Using PCTeX version 6,
specialbmp:nhsealBW.bmp x=1in y=1in
puts the .bmp image at the current location.
With pdfTeX I was using a set of pdfTeX special commands which are not available in XeTeX:
newboxstateseal
setboxstatesealhboxpdfximage height 1in width 1in nhsealbw.jpg
pdfrefximagepdflastximage
Puts the .jpg image into the box and
copystateseal
inserts it at the current location.
How do I do that in XeTeX?
graphics xetex plain-tex jpeg bitmap
|
show 4 more comments
Using XeTeX, I would like to insert a bitmap image file which is in .bmp format, or alternatively, the same image in a .jpg format. I am using plain TeX, not LaTeX.
Using PCTeX version 6,
specialbmp:nhsealBW.bmp x=1in y=1in
puts the .bmp image at the current location.
With pdfTeX I was using a set of pdfTeX special commands which are not available in XeTeX:
newboxstateseal
setboxstatesealhboxpdfximage height 1in width 1in nhsealbw.jpg
pdfrefximagepdflastximage
Puts the .jpg image into the box and
copystateseal
inserts it at the current location.
How do I do that in XeTeX?
graphics xetex plain-tex jpeg bitmap
Please use 4 spaces to indent code blocks and back ticks for inline code. For blocks, you can highlight them and then click thebutton or ctrl+k.
– cfr
May 1 '16 at 23:54
Have you looked at PGF/TikZ? Although it recommendsgraphicxwhere that's an option (obviously not here), it also have image inclusion capabilities. You just have to declare the image first, if I remember rightly.
– cfr
May 2 '16 at 0:08
What would that look like in plain TeX source file? And where does PGF/TikZ come from? Thank you.
– GAS4
May 2 '16 at 0:30
What do you mean where does it come from? It is part of all standard TeX distributions, like other packages.
– cfr
May 2 '16 at 0:44
1
See section 105 of the manual. Actually, it won't help as you are using XeTeX. If pdfTeX is an option, you can use PGF image declaration and inclusion with plain TeX. Otherwise, it only works with the LaTeX format, apparently.
– cfr
May 2 '16 at 0:55
|
show 4 more comments
Using XeTeX, I would like to insert a bitmap image file which is in .bmp format, or alternatively, the same image in a .jpg format. I am using plain TeX, not LaTeX.
Using PCTeX version 6,
specialbmp:nhsealBW.bmp x=1in y=1in
puts the .bmp image at the current location.
With pdfTeX I was using a set of pdfTeX special commands which are not available in XeTeX:
newboxstateseal
setboxstatesealhboxpdfximage height 1in width 1in nhsealbw.jpg
pdfrefximagepdflastximage
Puts the .jpg image into the box and
copystateseal
inserts it at the current location.
How do I do that in XeTeX?
graphics xetex plain-tex jpeg bitmap
Using XeTeX, I would like to insert a bitmap image file which is in .bmp format, or alternatively, the same image in a .jpg format. I am using plain TeX, not LaTeX.
Using PCTeX version 6,
specialbmp:nhsealBW.bmp x=1in y=1in
puts the .bmp image at the current location.
With pdfTeX I was using a set of pdfTeX special commands which are not available in XeTeX:
newboxstateseal
setboxstatesealhboxpdfximage height 1in width 1in nhsealbw.jpg
pdfrefximagepdflastximage
Puts the .jpg image into the box and
copystateseal
inserts it at the current location.
How do I do that in XeTeX?
graphics xetex plain-tex jpeg bitmap
graphics xetex plain-tex jpeg bitmap
edited May 2 '16 at 4:14
A Feldman
2,5281744
2,5281744
asked May 1 '16 at 23:02
GAS4GAS4
647
647
Please use 4 spaces to indent code blocks and back ticks for inline code. For blocks, you can highlight them and then click thebutton or ctrl+k.
– cfr
May 1 '16 at 23:54
Have you looked at PGF/TikZ? Although it recommendsgraphicxwhere that's an option (obviously not here), it also have image inclusion capabilities. You just have to declare the image first, if I remember rightly.
– cfr
May 2 '16 at 0:08
What would that look like in plain TeX source file? And where does PGF/TikZ come from? Thank you.
– GAS4
May 2 '16 at 0:30
What do you mean where does it come from? It is part of all standard TeX distributions, like other packages.
– cfr
May 2 '16 at 0:44
1
See section 105 of the manual. Actually, it won't help as you are using XeTeX. If pdfTeX is an option, you can use PGF image declaration and inclusion with plain TeX. Otherwise, it only works with the LaTeX format, apparently.
– cfr
May 2 '16 at 0:55
|
show 4 more comments
Please use 4 spaces to indent code blocks and back ticks for inline code. For blocks, you can highlight them and then click thebutton or ctrl+k.
– cfr
May 1 '16 at 23:54
Have you looked at PGF/TikZ? Although it recommendsgraphicxwhere that's an option (obviously not here), it also have image inclusion capabilities. You just have to declare the image first, if I remember rightly.
– cfr
May 2 '16 at 0:08
What would that look like in plain TeX source file? And where does PGF/TikZ come from? Thank you.
– GAS4
May 2 '16 at 0:30
What do you mean where does it come from? It is part of all standard TeX distributions, like other packages.
– cfr
May 2 '16 at 0:44
1
See section 105 of the manual. Actually, it won't help as you are using XeTeX. If pdfTeX is an option, you can use PGF image declaration and inclusion with plain TeX. Otherwise, it only works with the LaTeX format, apparently.
– cfr
May 2 '16 at 0:55
Please use 4 spaces to indent code blocks and back ticks for inline code. For blocks, you can highlight them and then click the
button or ctrl+k.– cfr
May 1 '16 at 23:54
Please use 4 spaces to indent code blocks and back ticks for inline code. For blocks, you can highlight them and then click the
button or ctrl+k.– cfr
May 1 '16 at 23:54
Have you looked at PGF/TikZ? Although it recommends
graphicx where that's an option (obviously not here), it also have image inclusion capabilities. You just have to declare the image first, if I remember rightly.– cfr
May 2 '16 at 0:08
Have you looked at PGF/TikZ? Although it recommends
graphicx where that's an option (obviously not here), it also have image inclusion capabilities. You just have to declare the image first, if I remember rightly.– cfr
May 2 '16 at 0:08
What would that look like in plain TeX source file? And where does PGF/TikZ come from? Thank you.
– GAS4
May 2 '16 at 0:30
What would that look like in plain TeX source file? And where does PGF/TikZ come from? Thank you.
– GAS4
May 2 '16 at 0:30
What do you mean where does it come from? It is part of all standard TeX distributions, like other packages.
– cfr
May 2 '16 at 0:44
What do you mean where does it come from? It is part of all standard TeX distributions, like other packages.
– cfr
May 2 '16 at 0:44
1
1
See section 105 of the manual. Actually, it won't help as you are using XeTeX. If pdfTeX is an option, you can use PGF image declaration and inclusion with plain TeX. Otherwise, it only works with the LaTeX format, apparently.
– cfr
May 2 '16 at 0:55
See section 105 of the manual. Actually, it won't help as you are using XeTeX. If pdfTeX is an option, you can use PGF image declaration and inclusion with plain TeX. Otherwise, it only works with the LaTeX format, apparently.
– cfr
May 2 '16 at 0:55
|
show 4 more comments
2 Answers
2
active
oldest
votes
It is possible to use the XeTeX primitives to query the image size and specify the image inclusion to xdvipdfmx driver, but even in plain TeX using system-specific special is painful and makes switching tex engines or drivers more complicated than need be.
You can use the same driver independent image inclusion macros as latex, which are already set up to do the right thing for bmp files with xetex.

from the plain xetex file
input graphicx
a work of art:
includegraphicsman.bmp
bye
where man.bmp is

But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
@GAS4 easiest is to usebox0hboxincludegraphicsmanthen useht0andwd0for the height and width. and finallybox0to use the image
– David Carlisle
Sep 12 '18 at 12:06
@GAS4 I guess you figured it out, but for any future readers, my comment above should startsetbox0notbox0
– David Carlisle
Sep 12 '18 at 18:01
add a comment |
The simplest way is to:
Convert image_01.bmp to image_01.eps [the imagemagik suite will do this.
Use the following PSTRICKS command
centerlineepsfysize = 5.0truecmepsfboximage_01.eps
[see do-it-yourself-tex on CTAN for the import PSTRICKS commands, etc]
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f307370%2fhow-to-include-a-bmp-image-in-xetex-using-plain-tex-source-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is possible to use the XeTeX primitives to query the image size and specify the image inclusion to xdvipdfmx driver, but even in plain TeX using system-specific special is painful and makes switching tex engines or drivers more complicated than need be.
You can use the same driver independent image inclusion macros as latex, which are already set up to do the right thing for bmp files with xetex.

from the plain xetex file
input graphicx
a work of art:
includegraphicsman.bmp
bye
where man.bmp is

But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
@GAS4 easiest is to usebox0hboxincludegraphicsmanthen useht0andwd0for the height and width. and finallybox0to use the image
– David Carlisle
Sep 12 '18 at 12:06
@GAS4 I guess you figured it out, but for any future readers, my comment above should startsetbox0notbox0
– David Carlisle
Sep 12 '18 at 18:01
add a comment |
It is possible to use the XeTeX primitives to query the image size and specify the image inclusion to xdvipdfmx driver, but even in plain TeX using system-specific special is painful and makes switching tex engines or drivers more complicated than need be.
You can use the same driver independent image inclusion macros as latex, which are already set up to do the right thing for bmp files with xetex.

from the plain xetex file
input graphicx
a work of art:
includegraphicsman.bmp
bye
where man.bmp is

But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
@GAS4 easiest is to usebox0hboxincludegraphicsmanthen useht0andwd0for the height and width. and finallybox0to use the image
– David Carlisle
Sep 12 '18 at 12:06
@GAS4 I guess you figured it out, but for any future readers, my comment above should startsetbox0notbox0
– David Carlisle
Sep 12 '18 at 18:01
add a comment |
It is possible to use the XeTeX primitives to query the image size and specify the image inclusion to xdvipdfmx driver, but even in plain TeX using system-specific special is painful and makes switching tex engines or drivers more complicated than need be.
You can use the same driver independent image inclusion macros as latex, which are already set up to do the right thing for bmp files with xetex.

from the plain xetex file
input graphicx
a work of art:
includegraphicsman.bmp
bye
where man.bmp is

It is possible to use the XeTeX primitives to query the image size and specify the image inclusion to xdvipdfmx driver, but even in plain TeX using system-specific special is painful and makes switching tex engines or drivers more complicated than need be.
You can use the same driver independent image inclusion macros as latex, which are already set up to do the right thing for bmp files with xetex.

from the plain xetex file
input graphicx
a work of art:
includegraphicsman.bmp
bye
where man.bmp is

answered Aug 25 '18 at 21:07
David CarlisleDavid Carlisle
497k4111441890
497k4111441890
But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
@GAS4 easiest is to usebox0hboxincludegraphicsmanthen useht0andwd0for the height and width. and finallybox0to use the image
– David Carlisle
Sep 12 '18 at 12:06
@GAS4 I guess you figured it out, but for any future readers, my comment above should startsetbox0notbox0
– David Carlisle
Sep 12 '18 at 18:01
add a comment |
But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
@GAS4 easiest is to usebox0hboxincludegraphicsmanthen useht0andwd0for the height and width. and finallybox0to use the image
– David Carlisle
Sep 12 '18 at 12:06
@GAS4 I guess you figured it out, but for any future readers, my comment above should startsetbox0notbox0
– David Carlisle
Sep 12 '18 at 18:01
But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
But is it a your picture with your hands:-)? +1.
– Sebastiano
Aug 25 '18 at 21:27
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
I need to query the image size so I can position the image without trial & error. Using Xetex primitives, can you demonstrate with your example please? Thank you.
– GAS4
Sep 12 '18 at 10:44
@GAS4 easiest is to use
box0hboxincludegraphicsman then use ht0 and wd0 for the height and width. and finally box0 to use the image– David Carlisle
Sep 12 '18 at 12:06
@GAS4 easiest is to use
box0hboxincludegraphicsman then use ht0 and wd0 for the height and width. and finally box0 to use the image– David Carlisle
Sep 12 '18 at 12:06
@GAS4 I guess you figured it out, but for any future readers, my comment above should start
setbox0 not box0– David Carlisle
Sep 12 '18 at 18:01
@GAS4 I guess you figured it out, but for any future readers, my comment above should start
setbox0 not box0– David Carlisle
Sep 12 '18 at 18:01
add a comment |
The simplest way is to:
Convert image_01.bmp to image_01.eps [the imagemagik suite will do this.
Use the following PSTRICKS command
centerlineepsfysize = 5.0truecmepsfboximage_01.eps
[see do-it-yourself-tex on CTAN for the import PSTRICKS commands, etc]
add a comment |
The simplest way is to:
Convert image_01.bmp to image_01.eps [the imagemagik suite will do this.
Use the following PSTRICKS command
centerlineepsfysize = 5.0truecmepsfboximage_01.eps
[see do-it-yourself-tex on CTAN for the import PSTRICKS commands, etc]
add a comment |
The simplest way is to:
Convert image_01.bmp to image_01.eps [the imagemagik suite will do this.
Use the following PSTRICKS command
centerlineepsfysize = 5.0truecmepsfboximage_01.eps
[see do-it-yourself-tex on CTAN for the import PSTRICKS commands, etc]
The simplest way is to:
Convert image_01.bmp to image_01.eps [the imagemagik suite will do this.
Use the following PSTRICKS command
centerlineepsfysize = 5.0truecmepsfboximage_01.eps
[see do-it-yourself-tex on CTAN for the import PSTRICKS commands, etc]
answered 8 mins ago
morris rogermorris roger
715
715
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f307370%2fhow-to-include-a-bmp-image-in-xetex-using-plain-tex-source-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown

Please use 4 spaces to indent code blocks and back ticks for inline code. For blocks, you can highlight them and then click the
button or ctrl+k.– cfr
May 1 '16 at 23:54
Have you looked at PGF/TikZ? Although it recommends
graphicxwhere that's an option (obviously not here), it also have image inclusion capabilities. You just have to declare the image first, if I remember rightly.– cfr
May 2 '16 at 0:08
What would that look like in plain TeX source file? And where does PGF/TikZ come from? Thank you.
– GAS4
May 2 '16 at 0:30
What do you mean where does it come from? It is part of all standard TeX distributions, like other packages.
– cfr
May 2 '16 at 0:44
1
See section 105 of the manual. Actually, it won't help as you are using XeTeX. If pdfTeX is an option, you can use PGF image declaration and inclusion with plain TeX. Otherwise, it only works with the LaTeX format, apparently.
– cfr
May 2 '16 at 0:55