Skip to content

Commit

Permalink
Yet another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
principejavier committed Oct 8, 2024
1 parent a41449d commit a2ce36a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Exams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ function format_figure!(format::WrappedFigure,str::Vector{String})
h=format.hang
v=replace("$t",r"\s"=>"")

# This code only works when figure is first or second. It should be generalized
if format.put_on_top
fig_pos = 1
t=str[fig_pos]
Expand All @@ -631,6 +632,7 @@ function format_figure!(format::WrappedFigure,str::Vector{String})
for (i,s) in enumerate(str)
if occursin("includegraphics",s)
fig_pos=i
str[fig_pos]=replace(s,"width"=>"width=$wfig\\textwidth")
break
end
end
Expand Down

0 comments on commit a2ce36a

Please sign in to comment.