How can I pass variables into my title with Latex Interpretation?

user3600497

I would like some parameter values to appear where the white box is in my picture (subplot(3,2,1)). It would be ideal if the interpretation in title() could be latex, like the others.

I have tried the following:

title( sprintf( ' $\delta$ = %s  $\rho$ = %s  $\xi$ = %s  m =  %s', delta, rho, xi, m), 'Interpreter', 'latex') 

But I get the following error:

Warning: Control Character '\d' is not valid. See 'doc sprintf' for control characters valid in the format string. 
> In SIXY_sol (line 21) 
Warning: Error updating Text.

 String must have valid interpreter syntax:
 $

How can I fix this?

enter image description here

Dan

This is not a problem with using the LaTeX interpreter but rather with the way you have used sprintf. In the docs for sprintf, scroll down to the section Text Before or After Formatting Operators. Here you will see that the \ character is used to begin an escape sequence so that you can do things like \n for a new line. You actually want \ to appear in your string so you need to escape the escape character. From that table in the docs you need to replace all of your \ with \\.

Try:

title( sprintf( ' $\\delta$ = %s  $\\rho$ = %s  $\\xi$ = %s  m =  %s', delta, rho, xi, m), 'Interpreter', 'latex') 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can i pass variables in Zend?

From Dev

How can I calibrate my printer using the LaTeX test page?

From Dev

How can I calibrate my printer using the LaTeX test page?

From Dev

How can I set my own order for an Enumeration in Latex?

From Dev

How can I pass form data AND my own variables via jQuery Ajax call?

From Dev

How can I pass form data AND my own variables via jQuery Ajax call?

From Dev

How can I pass an object to my AsyncTask?

From Dev

How can I use regex with sed (or equivalent unix command line tool) to fix title case in LaTeX headings?

From Dev

How can I add text on the left and right of my Panel Title?

From Dev

How can I definitively change the title of my Ember application?

From Dev

How Can I change the title of my java app on the osx menubar?

From Dev

How can I create Dynamic Title in my Windows Phone Application?

From Dev

How do i pass my scope correctly to look for variables

From Dev

How do I pass these variables to calculate a new GPA in my class?

From Dev

How can I pass my search keyword to my Controller?

From Dev

How can I make an icon appear next to my title in the <title> tag?

From Dev

How can I make an icon appear next to my title in the <title> tag?

From Dev

How can I pass variables into an R markdown .Rmd file?

From Dev

How can i pass ENV variables between make targets

From Java

AngularJS: How can I pass variables between controllers?

From Dev

How can I pass variables from awk to a shell command?

From Dev

How can I pass all current environmental variables in a node spawn?

From Dev

How can I pass variables to main view in phalconphp

From Dev

How can I pass variables between DRY templates and ncludes in Jekyll

From Dev

How can i pass multiple variables in the Url for the Spring controller?

From Dev

How can I pass multiple variables into a template in Webpy?

From Dev

How can I pass extra variables with image over an AJAX call

From Dev

How can I pass around variables between handlers

From Dev

How can I pass Express.js variables to MongoDB functions?

Related Related

  1. 1

    How can i pass variables in Zend?

  2. 2

    How can I calibrate my printer using the LaTeX test page?

  3. 3

    How can I calibrate my printer using the LaTeX test page?

  4. 4

    How can I set my own order for an Enumeration in Latex?

  5. 5

    How can I pass form data AND my own variables via jQuery Ajax call?

  6. 6

    How can I pass form data AND my own variables via jQuery Ajax call?

  7. 7

    How can I pass an object to my AsyncTask?

  8. 8

    How can I use regex with sed (or equivalent unix command line tool) to fix title case in LaTeX headings?

  9. 9

    How can I add text on the left and right of my Panel Title?

  10. 10

    How can I definitively change the title of my Ember application?

  11. 11

    How Can I change the title of my java app on the osx menubar?

  12. 12

    How can I create Dynamic Title in my Windows Phone Application?

  13. 13

    How do i pass my scope correctly to look for variables

  14. 14

    How do I pass these variables to calculate a new GPA in my class?

  15. 15

    How can I pass my search keyword to my Controller?

  16. 16

    How can I make an icon appear next to my title in the <title> tag?

  17. 17

    How can I make an icon appear next to my title in the <title> tag?

  18. 18

    How can I pass variables into an R markdown .Rmd file?

  19. 19

    How can i pass ENV variables between make targets

  20. 20

    AngularJS: How can I pass variables between controllers?

  21. 21

    How can I pass variables from awk to a shell command?

  22. 22

    How can I pass all current environmental variables in a node spawn?

  23. 23

    How can I pass variables to main view in phalconphp

  24. 24

    How can I pass variables between DRY templates and ncludes in Jekyll

  25. 25

    How can i pass multiple variables in the Url for the Spring controller?

  26. 26

    How can I pass multiple variables into a template in Webpy?

  27. 27

    How can I pass extra variables with image over an AJAX call

  28. 28

    How can I pass around variables between handlers

  29. 29

    How can I pass Express.js variables to MongoDB functions?

HotTag

Archive